Repository navigation
Let idle desktop chat views beyond the three most recent go - #2472
Merged
Merged
Conversation
The window opens every chat it shows and never says when it stops showing one, while an open view kept its conversation through the idle sweep until agents.close. Each chat shown in a session therefore stayed held, with its journal, presence watch and timers, until the app quit (#2471). The idle sweep now keeps an open view's conversation only for the three most recently used views. An older view idle for ten minutes is let go like a background chat and opens again on its next read or send. Running turns, waiting questions, crews, services and explicit closes behave as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 6, 2026
AbirAbbas
added a commit
that referenced
this pull request
Nov 6, 2026
…2473) * Revert "Let idle desktop chat views beyond the three most recent go (#2472)" This reverts commit 2c717c0. Releasing an open view lets another process (the codeaf CLI on the same home) run a turn in a chat the window is showing. Before #2472 that turn was refused ("this conversation is open in another window"). After it, the turn runs, the window gets only working/idle state for it and none of its entries, and the app's next open of that chat starts a spurious "the app closed unexpectedly" resume turn. Restore the held view until a fix keeps both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * changelog: revert of bounded desktop view holds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #2471.
Problem
Every chat the desktop app shows stayed held by
codeaf appuntil the app quit, along with its open files and per-chat timers.agents.openwhen it shows a chat, including a hover prefetch. It callsagents.closeonly for a factory job's chats.agents.opensetsviewOpen, and the idle sweep never let a conversation withviewOpengo.viewOpenwas cleared only byagents.close. Merge dev (through #2002) into app/v3: relay, two-computer fixes, quit saving #2009 added this so that an open view keeps its relay hold.What one held chat costs, measured with
lsofon a standalonecodeaf appdriven over its wire:.cell,.codeaf,meta.json,presence.json,meta.lock)..cell/transcript.jsonl.agents.closealready gives all of this back: 47 fds, then 59/65/71 with 1/2/3 chats open, then 47 after closing, the same on every cycle.Fix
The idle sweep keeps an open view's conversation only for the
appViewHolds(3) most recently used views. An older view idle forappAgentIdle(10 min) is let go the same way a background chat is: its state stays idle, and its next read or send opens it again through the normal ownership check.internal/manual/chat/desktop-sync.mdis updated to match.Measurements
Standalone
codeaf appon macOS. Before is the soak binary (app/v3 3a6aa31 + #2466); after is this branch. 10 seeded chats, each opened withagents.openand then left idle, no desk UI:Tests
TestAppIdleViewsBeyondTheRecentHoldsAreLetGo. It opens 7 views and checks that all are kept within the idle rule. Past the rule, it checks that exactly the 3 most recently used are kept, that further opened-and-idle chats never grow the holds, and that every other open is released once.go test ./cmd/codeaf -run '^(TestAppIdleViewsBeyondTheRecentHoldsAreLetGo|TestAppLetsAnIdleConversationGoAndTheNextSendReopensIt)$' -count=3.TestAppIdleRelease.*,TestAppBackgroundE13.*,TestAppLazy.*,TestALiveServiceKeepsItsAgentThroughTheIdleSweep),go vet ./cmd/codeaf,gofmtandgo test ./internal/manual/.🤖 Generated with Claude Code