You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Archiving a thread should archive its native provider session
#18975
Archiving a thread in T3 Code hides it in T3 and detaches its provider session, but no provider is told. The thread stays active in Codex, OpenCode, and every other harness that has its own session list, so anyone who uses both ends up archiving twice.
It is worse in reverse: if I archive the thread in Codex myself and T3 later resumes it, the Codex adapter unarchives it again (CodexAdapterV2.ts, the thread/unarchive retry on "session … is archived").
thread.archive in apps/server/src/orchestration-v2/Orchestrator.ts cancels queued work, emits provider-session.detach (with revokeMcpCredential), and queues terminal.cleanup. Nothing reaches the provider.
No adapter archives or deletes its native session on archive. The only native session mutation is the manual ACP delete under Settings → Native sessions, which is unrelated to archive and refuses while a T3 thread references the session.
time.archived is on the session, but SessionUpdateInput in @opencode/client 2.0.23 cannot set it
—
@opencode/client 2.0.23
Cursor
Agent.archive / Agent.unarchive, documented as cloud-only; T3 runs local agents
cloud-only
@cursor/sdk 1.0.35 stubs.d.ts
Claude
—
deleteSession() (removes the transcript)
@anthropic-ai/claude-agent-sdk 0.3.x sdk.d.ts
ACP agents (incl. Grok)
—
session/delete, when advertised
packages/effect-acp
Antigravity, Muse, Pi
—
—
adapters and SDK types
Proposal
Give provider adapters optional archiveNativeSession / unarchiveNativeSession capabilities, implemented where the provider has a native archive: Codex and OpenCode 1.x today, OpenCode 2 and Cursor local agents once their APIs allow it.
A native archive failure is logged and never fails the T3 archive.
Deletion (Claude, ACP) is deliberately left out. T3 resumes and forks from the native session, so deleting it on archive would make unarchive lossy. If there is appetite for it, it belongs in thread deletion rather than archive.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
Archiving a thread in T3 Code hides it in T3 and detaches its provider session, but no provider is told. The thread stays active in Codex, OpenCode, and every other harness that has its own session list, so anyone who uses both ends up archiving twice.
It is worse in reverse: if I archive the thread in Codex myself and T3 later resumes it, the Codex adapter unarchives it again (
CodexAdapterV2.ts, thethread/unarchiveretry on "session … is archived").Current behavior (main @ 6524a8d)
thread.archiveinapps/server/src/orchestration-v2/Orchestrator.tscancels queued work, emitsprovider-session.detach(withrevokeMcpCredential), and queuesterminal.cleanup. Nothing reaches the provider.What each provider supports natively
thread/archive,thread/unarchivepackages/effect-codex-app-server/src/_generated/meta.gen.tssession.update({ time: { archived } })session.delete@opencode-ai/sdk1.19dist/v2/gen/sdk.gen.d.tstime.archivedis on the session, butSessionUpdateInputin@opencode/client2.0.23 cannot set it@opencode/client2.0.23Agent.archive/Agent.unarchive, documented as cloud-only; T3 runs local agents@cursor/sdk1.0.35stubs.d.tsdeleteSession()(removes the transcript)@anthropic-ai/claude-agent-sdk0.3.xsdk.d.tssession/delete, when advertisedpackages/effect-acpProposal
archiveNativeSession/unarchiveNativeSessioncapabilities, implemented where the provider has a native archive: Codex and OpenCode 1.x today, OpenCode 2 and Cursor local agents once their APIs allow it.thread.archivearchives each of the thread's native sessions (including subagent sessions once feat(server): archive and unarchive cascade to subagent threads #18668 lands), andthread.unarchivereverses it.Deletion (Claude, ACP) is deliberately left out. T3 resumes and forks from the native session, so deleting it on archive would make unarchive lossy. If there is appetite for it, it belongs in thread deletion rather than archive.
All reactions