Repository navigation
fix(cloud): every cloud chat hears where heavy work belongs, not only brand-new ones - #196
Merged
Merged
Conversation
… brand-new ones The cloud machine note went only to the first turn of a brand-new native conversation, so chats that began before it existed, or lost it to compaction, never heard it. It now goes on the first turn of each provider session for a native thread, tracked per live session runtime, and also asks the agent to remove worktrees, installs and /tmp data it no longer needs. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
andrewcai8
enabled auto-merge (squash)
October 7, 2026 15:35
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A disk census of 11 awake cloud chats (73 GB disks) found the 4 recent chats at about 31 GB with one worktree each. The 7 long-running chats that started before the cloud machine note existed sat at 36 to 61 GB, with 5 to 20 worktrees, up to 17 GB under
~/.t3/worktrees, up to 13 GB in/tmp, and 20 to 71node_modulesdirectories. They run a build that has the note, but it went only to the first turn of a brand-new native conversation, so they never got it. A long chat can also lose turn-1 context to compaction.The note now goes on the first turn of each provider session for a native thread. That covers a new chat, a wake, an upgrade restart, an account switch, and a session reopened after 30 idle minutes.
cloudMachineNoteForrecords which native threads each live session runtime has told, in aWeakMapkeyed by the runtime object thatProviderSessionManager.openreturns. A new session gets a new runtime object and hears the note again, and the record is dropped along with the session. The other gates are unchanged: cloud box only, never subagents, and the forks sentence only with MCP tools off darwin. The note also gains one sentence asking the agent to remove worktrees, installs and/tmpdata it created once it no longer needs them.lowDiskNoteis unchanged.Tests:
DiskHeadroom.test.tschecks that a session hears the note on its first turn but not its second, that the session's other native threads and a new session hear it again, and that subagents never do.ProviderTurnStartService.test.tschecks that a native thread that already has turns hears the note when a new session starts. Both failed before the change.Claude Opus 5.5 (1M context), Claude Code
🤖 Generated with Claude Code