Long working sessions auto-archive mid-conversation; no opt-out
Symptom
In an active Claude Code session — specifically the chat UI (claude.ai/code in a browser, or possibly the desktop app — see env note below) — the input field gets replaced with a notice that reads "this conversation has been archived" and an "Unarchive to continue chat" button. This happens automatically without any user action, apparently after some inactivity threshold.
The conversation is recoverable via the Unarchive button (so no data is lost), but for long working sessions that include multi-step plans, sub-agents in progress, MCP tool state, and verification cycles, having the input field disappear mid-flow is disruptive. The "Unarchive" prompt also makes it look like the model has stopped responding, when really the user just needs to click through.
What I tried (and what didn't fix it)
Setting cleanupPeriodDays: 999999 in %USERPROFILE%\.claude\settings.json does not prevent this — that setting controls local transcript file cleanup at startup, not the in-chat archive behavior.
What I'm looking for
Either:
- A user-facing setting (e.g.
disableAutoArchive: trueinsettings.json, or a per-conversation "pin" / "keep active" toggle in the UI), OR - Documentation explaining the threshold so we can plan around it
Why this matters for working sessions
For typical short Q&A chats the auto-archive is probably fine — it keeps the active list manageable. But Claude Code working sessions routinely run 1–4 hours and include:
- Background agents that I'm waiting on
- Multi-step plans where I step away to take an action (apply a migration, click through a dashboard, run a manual test) and come back
- MCP tool state I don't want to interrupt
When the chat archives during that gap, it breaks the flow and forces an extra click that can fire on top of an in-progress response.
Environment
- Platform: Windows 11
- Claude Code: confirmed running but couldn't determine version via
claude --version, npm globals, registry, or%LOCALAPPDATA%\Programs— suggests browser-based use of claude.ai/code (or a non-standard install path) - Symptom occurs across multiple long-running sessions
Workaround for now
Click "Unarchive" whenever it appears. That works but isn't viable for sessions where the user wants to leave Claude Code running unattended (e.g., during a long background agent or a multi-hour build).
---
Thanks for considering. Happy to provide more detail or test a proposed fix.
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
The dup-bot is roughly right — #59449, #59235, and #59451 are all looking at this same family of behavior — and #59449 is the most active living thread if you want to add the Windows-11 + multi-hour-working-session signal there before this one auto-closes.
Two things in your report look genuinely useful for the maintainer triage that the 3 dups don't surface as crisply:
cleanupPeriodDays: 999999red-herring. That's the first setting most users will try (it sounds adjacent and it's documented). Confirming on the issue that it does nothing for in-chat archive is a useful disambiguation — the chat-archive timer is a separate subsystem from local transcript cleanup, and treating them as the same setting is what most affected users will do first.For multi-hour working sessions while this is being triaged, three operator workarounds that have held up for us:
Bash(echo .)or a Read on a sentinel file. That keeps the conversation classified as active and prevents the archive trigger entirely in our testing.claude -p(print mode) or aclaude --resume <session-id>invocation from a terminal — the archive timer is a chat-UI artifact, not a session-state artifact. The session ID survives; the archive flag is what flips, and--resumeignores it.~/.claude/projects/<project-hash>/for mtime changes and emit a tool-input touch from your supervisor when it stalls — same effect as (1) but driven from the orchestrator, not from inside the agent.None of these are a substitute for the per-conversation pin /
disableAutoArchiveyou asked for. They're load-bearing for keeping a multi-hour working session alive against the current behavior.The workarounds don't reliably work on claude code (desktop) sessions we need a way to disable this stupidity.
Also running into this on the desktop app.
I run multi-hour Claude Code desktop sessions (long CI/build loops + multi-step refactors), and the conversation gets auto-archived mid-task while I'm actively working in it — I then have to Unarchive to continue, which breaks flow and is easy to miss.
Workarounds that don't help, for the record:
cleanupPeriodDaysin~/.claude/settings.json— no effect; it only governs local transcript deletion, not the archive behavior.settings.jsonkey or UI toggle to opt out.Request: a user-facing opt-out — e.g. a
disableAutoArchive(orautoArchive: false, or a configurable idle threshold) key insettings.json— so long-running sessions aren't archived out from under an active workflow.Thanks!
This issue makes the desktop app useless for some of us. The only viable workaround is to run from a terminal so please fix this I otherwise like the desktop app but now never use it.
Also hitting this on the desktop app — Claude.app 1.24012.1, Claude Code 2.1.214, macOS 26.4.1.
Active sessions with no linked PR get archived daily while work is in progress. From local session state (
~/Library/Application Support/Claude/claude-code-sessions), most archived sessions are not PR-linked — e.g. Jul 22: 29 archived (only 3 PR-linked), Jul 23: 11 (2 PR-linked) — so this is separate from the "Auto-archive after PR merge or close" preference and has no visible opt-out.Two observations from digging into local state that may help triage:
autoArchiveExemptflag (set after a manual unarchive), but it doesn't appear to reliably prevent re-archiving — one restored session was re-archived within ~30 minutes withautoArchiveExempt: trueon disk (the PR-close preference was still enabled in the running app at that point, so that instance may be the PR path — but the flag not protecting a just-restored session seems wrong either way).claude_desktop_config.jsonand the session-state files as write-through mirrors — external edits are ignored and overwritten.An explicit "never auto-archive" setting — or honoring
autoArchiveExempt/ activity recency for running sessions — would resolve this. Multi-session workflows lose active sessions to the Archived list dozens of times a week.