#5580·paseo

Archiving an OpenCode agent leaves its session in Import session

Author: paseo-bot[bot]Created Sep 28, 2026Updated Sep 28, 2026
Labelsbugp2triagedneeds-maintainerdiagnosed

An archived OpenCode agent's session still appears in Import session. A Codex agent's session drops out of Import session once the agent is archived.

Observed locally while testing PR #5572 on its head, with an isolated daemon and the web app, on a custom provider that extends OpenCode:

  1. Create an agent on the provider, run one turn, and archive the agent (paseo archive <id>).
  2. Open Import session for that workspace and filter to the provider.

Expected: the archived agent's session is not listed, the same as for Codex. Actual: it is listed. OpenCode's own session row has time.archived set after the archive, so the native archive ran.

The OpenCode listing in packages/server/src/server/agent/providers/opencode-agent.ts (collectOpenCodeImportableSessionsFromSdk) calls experimental.session.list with archived: true and does not filter archived sessions, while the OpenCode v2 client (packages/server/src/server/agent/providers/opencode/v2/agent.ts) filters them out. Stock OpenCode goes through the same listing function, so it has the same behavior from the source. I did not run stock OpenCode.