[BUG] Sandbox/scratchpad state lost after long idle period (weekly usage limit reset), despite same continuous conversation
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Summary
After hitting the weekly usage limit and waiting ~1.5 days for it to reset, I resumed
the same conversation (same chat thread, not a new one) and found that Claude's
session-scoped scratchpad directory had been wiped. A working file that had been
built up over several turns (an HTML artifact with multiple rounds of edits) was
gone. The directory path itself had a new session UUID, distinct from the one used
earlier in the same conversation.
Impact
Claude had to re-fetch the last-published version of the artifact from its hosted
URL and manually reapply several rounds of prior edits from conversation context to
reconstruct the file. This cost a significant number of extra tokens (15k+) purely
to recover state that should have persisted across a usage-limit wait, since the
conversation itself was never ended or restarted by me.
Expected behavior
Session/sandbox state (or at minimum the scratchpad working directory) should
persist across a usage-limit cooldown within the same continuous conversation,
or the user/model should be clearly warned that it won't.
Environment
- Claude Code (web-based session, Claude Sonnet 5)
- Working directory: local macOS project folder
- Scratchpad path observed to change from one session-UUID subdirectory to another
after the wait, with the original left empty
What Should Happen?
Expected behavior
Session/sandbox state (or at minimum the scratchpad working directory) should
persist across a usage-limit cooldown within the same continuous conversation,
or the user/model should be clearly warned that it won't.
Error Messages/Logs
None noted, beyond Claude stating that the scratchpad was no longer showing the file, and it had to be recreated from the existing communication chat thread.
Steps to Reproduce
Environment
- Claude Code (web-based session, Claude Sonnet 5)
- Working directory: local macOS project folder
- Scratchpad path observed to change from one session-UUID subdirectory to another
after the wait, with the original left empty
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.21459.0
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗