How I run opencode in CI without flooding my session inbox
Automated opencode runs pile up in your inbox and session lists, burying the interactive sessions you actually care about. The --archived flag creates scripted runs already archived so they stay out of the way.
What it is
opencode run is the scripted, non-interactive entry point for opencode. New flags let runs start archived (--archived) or in a fresh git worktree (-w or --worktree=<name>).
Applied case
A developer wires opencode into a CI pipeline to generate code reviews on every pull request. Without the flag, each run would appear in the inbox, home, and TUI session list. By adding --archived, the session is created already archived: hidden from the inbox, home, and session lists, and skipped by --continue. For runs that need isolation, -w starts the session in a new git worktree, with --worktree=<name> to choose the name, though it cannot combine with --continue or --session.
- Add --archived so CI runs never appear in your inbox or session list
When to use it
Use when scripted, scheduled, or CI-driven opencode runs clutter your interactive workflow.
Skip when you want the run visible for follow-up by hand. Note: --archived hides sessions but does not delete them or manage retention.
Read more
Recommended for you
- WorkflowVercel
How I keep agent loops fast without waiting on slow models
Agent workflows stall when each step waits seconds for model output, so throughput becomes the real bottleneck.
- WorkflowCodex CLI
How I keep Codex agent sessions under control without losing drafts
Codex developers switching model backends mid-chat used to lose drafts and miss finished runs, forcing re-typed prompts and overlooked results.
- WorkflowClaude Code
Why does your CI agent still stall on permission prompts?
Unattended Claude Code turns hang whenever a tool call waits for a permission prompt nobody answers, breaking scripts and subagent workflows.
- WorkflowVercel
When to use a vision coding agent instead of a plain LLM?
Text-only models miss detail in screenshots and charts, and drift on long-running agent tasks across a large codebase.
Enjoyed this article?
Subscribe for new articles. No spam. Unsubscribe anytime.