Add explicit toggle to disable session auto-archive

Resolved 💬 3 comments Opened May 14, 2026 by All-The-New Closed Jul 16, 2026

Summary

Claude Code auto-archives sessions mid-conversation. Operators who run multi-instance workflows would like an explicit setting to disable this behavior and rely on manual /archive only.

Symptom

During a long-running Forge session on 2026-05-13, the chat was auto-archived twice while work was still in progress — between turns, with no explicit /close or /archive. Queued user messages were held instead of routed, and on the first auto-archive the live git worktree at .claude/worktrees/epic-mclean-1c0e28 was deleted, forcing re-orientation against the origin repository on resume.

Trigger appears to be an idle-timeout heuristic that fires even when there are queued user messages or pending tool results.

Impact

  • Mid-conversation state loss (open PRs in flight, unresolved tool calls)
  • Worktree deletion mid-edit forces a re-orient and re-read of state
  • Operator can't reliably predict when a session will go away
  • No documented way to opt out

Ask

Add an explicit setting (e.g. \disableSessionAutoArchive: true\ in \~/.claude/settings.json\ or a per-instance equivalent) that suppresses idle-driven auto-archive. Sessions would then only archive when:

  1. The operator explicitly invokes \/archive\ or \/close\, or
  2. The operator closes the Claude Code window

Environment

  • macOS Darwin 25.4.0
  • Multi-instance setup (2–3 concurrent Claude Code instances)
  • \defaultMode: \"bypassPermissions\"\ in user settings
  • Sessions running through worktrees under \.claude/worktrees/\

Workaround

None known — the only mitigation is unarchive-and-resume after the fact, which doesn't recover deleted worktrees.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗