Repository navigation
Conversation
5 tasks
craftowen
force-pushed
the
fix/closed-agent-retention-race
branch
2 times, most recently
from
July 20, 2026 07:43
5c8d585 to
300618a
Compare
craftowen
marked this pull request as ready for review
July 20, 2026 07:44
Contributor
📝 WalkthroughWalkthroughRetention synchronization now passes recently closed agent status tab identifiers to the disappearance collector. The collector accepts the new input and skips re-retaining vanished agents whose tabs were recently closed. Tests update collector calls, add shared store setup, and cover hook synchronization during teardown and subsequent retention effects. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nwparker
force-pushed
the
fix/closed-agent-retention-race
branch
from
July 23, 2026 11:48
300618a to
d981f89
Compare
nwparker
added a commit
that referenced
this pull request
Jul 24, 2026
Co-authored-by: Orca <[email protected]>
nwparker
added a commit
that referenced
this pull request
Jul 24, 2026
Co-authored-by: Orca <[email protected]>
Contributor
|
Heads-up @craftowen: this got auto-closed but the underlying bug (#8970) was never actually fixed on |
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
…ablyai#10334) Co-authored-by: Orca <[email protected]>
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.
Summary
Prevents a cleanly completed agent row from being resurrected in the sidebar after its terminal tab has already been closed.
ELI5
When you finished an agent and closed its tab, a stale "done" card could pop back into the list on its own. This makes the closed card stay gone.
Root cause & fix
A race: PTY cleanup removes the live agent row before
closeTabplants its durable retention suppressor, so the next retention effect saw a completed row with no suppressor yet and re-retained it as a stale "done" card. The fix threadsrecentlyClosedAgentStatusTabIdsintocollectRetainedAgentsOnDisappear, which now skips re-retaining any done row whose tab id is marked recently-closed. It is an additive guard param with an earlycontinue, so existing retention paths are untouched.Evidence
Validated & rebased onto latest main during a bug-bash triage on 2026-07-23. Rebase was clean (base
7ab601487c, head300618a0bb).useRetainedAgents.test.ts— Test Files 1 passed (1); Tests 7 passed (7).useRetainedAgents.ts) toorigin/mainwhile keeping the new test: 2 failed | 5 passed (7). Failing assertions:collectRetainedAgentsOnDisappear > does not retain a done row after its tab closed without a live suppressor—toRetainexpected[], got 1 entry.useRetainedAgentsSync > does not re-retain when status removal and tab closure commit before the next retention effect—retainedAgentsByPaneKey[paneKey]expectedundefined.oxlinton the changed file — clean, no warnings/errors.Trade-offs
None — pure fix.
Regression risk
Effectively zero. The change is an additive parameter plus an early
continuethat fires only on the buggy branch (done row whose tab is recently-closed); all other retention paths are byte-identical, as proven by the 5 unchanged tests that still pass with the fix reverted. Pure renderer store logic — no cross-platform, SSH, or Git concerns.Original fix by @craftowen (addresses the Ctrl+W repro in #8970). Validated, rebased, and reviewed via automated bug-bash triage; original fix design preserved.