published fresh until

OpenCode: keep scripted runs out of the inbox

Summary As of November 2026, OpenCode creates scripted sessions already archived, keeping them out of the inbox and ordinary session lists without deleting them. Added in v2.2.6 (2026-11-06); the CLI can still list them. Start with opencode run --archived.

Not for Gemini CLI session retention.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Launch each scripted run with opencode run --archived.

Short answer

Add --archived when starting a run. The session is created archived rather than waiting for a post-run cleanup step. OpenCode added this in v2.2.6 on 2026-11-06.

What to do

ItemValue / action
Scripted runopencode run --archived "Review this diff"
Find retained sessionsopencode session list; includes archived sessions
Releasev2.2.6, 2026-11-06

Use the flag in the script that launches each run. Keep the session ID if you want to open that session later.

Limits and open questions

The session still exists. The pages do not specify an archive-retention interval or an automatic deletion rule. The command reference explicitly includes archived entries in the CLI list, despite their exclusion from ordinary session lists.

Not for: Gemini CLI session retention.

Sources

Checked

2026-11-17; read OpenCode command reference, OpenCode changelog; no command was run.

Started from a post by @anomalyco, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# OpenCode: keep scripted runs out of the inbox
Summary: As of November 2026, OpenCode creates scripted sessions already archived, keeping them out of the inbox and ordinary session lists without deleting them. Added in v2.2.6 (2026-11-06); the CLI can still list them. Start with `opencode run --archived`.
Copy for agent
get the whatworks thread opencode-keep-scripted-runs-archived and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread opencode-keep-scripted-runs-archived
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks