Repository navigation
fix(native-chat): settle refused helpers after the status store fills - #28829
brennanb2025 wants to merge 3 commits into
Conversation
Review loop status: code review passed, CI green, QA passedProblem. Orca's agent-status store holds at most 8,192 helper (subagent) records per host and refuses records beyond that. Orca remembered at most 512 of the refused helpers. If more than 512 were refused, the background-task strip kept saying tracking was incomplete even after every helper had finished, because Orca could no longer tell which refused helpers had ended. This also made the "incomplete" signal unreliable for the idle-cleanup fix in #28812. User-facing change. After the last refused helper ends, the strip goes back to normal instead of staying "incomplete" until the agent session ends. Ordinary chats behave exactly as before. What was fixed. The host now remembers each refused helper by its exact ID until that helper is admitted, ends, or its session ends. Stop and session end still clear everything. A time-based expiry was considered and rejected because it could forget a helper that is still working. Nothing is deferred. What was verified.
Not verified / remaining risks.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
|
Closing: this patches the status store's size limits, which are themselves wrong. The fix is moving to the root of that store in a separate change. |


ELI5
When the agent-status store was full (it holds at most 8,192 helper records), it refused records for extra background helpers. Orca remembered at most 512 refused helper IDs. If a chat had more than that, the background-task strip could keep saying details were unavailable even after every helper finished, because Orca no longer knew which refused helpers had ended.
What Changed
Orca now remembers each refused helper until that helper is admitted into the store or reports its end. After the last one ends, incomplete tracking clears and the existing background-task strip returns to its normal state. A user-initiated Stop and the provider session's end still clear all remembered helpers.
User-facing before and after:
Why
The old 512-helper overflow marker could clear only when the whole agent session ended. Remembering the actual helper IDs lets the host settle each one from its own end event. A time limit was considered and rejected: it would risk forgetting a helper that is still working. The retained set grows with the number of distinct refused helpers whose end the host has not seen; it has no fixed count cap. If a provider never sends a helper's end, the session end or manual Stop clears it. This base change is separate so the idle-sweep fix in #28812 can rely on an accurate incomplete signal.
How this differs from the common pattern (INTENDED): the common pattern derives owed child work from one provider-reported roster of children. Here, admitted children live in the bounded display status store and the exact set of refused helpers is kept beside it by the execution host. Intended because generic ACP agents expose no helper signal and Grok exposes only bounded projections, so the exact refused-helper set is the host-owned truth under the display store's cap. A provider-reported child-work model that gives every reader one execution-owned source for all children is a possible later refactor.
Linked Issue
STA-10504
Visual Proof
This change adds no UI element; it clears an existing strip state after an unusually large group of helpers ends, which is covered by the automated test below. Hidden-window QA ran on the full stack (this PR plus #28812 at commit 05a4c08, before main was merged in) against main on a separate Mac with real Claude Code and showed no user-visible difference for a short prompt, a long command stopped with Stop, and one subagent. The side-by-side screenshots are in #28812's Visual Proof.
Testing
PR checks passedaggregate, passes on the current head (1517715). The commits after 7df5a64 only merge in current main, with no conflicts.Review
Reviewed as the base of the #28812 stack: three adversarial rounds plus an architecture challenge. This exact-tracking change resolved both findings those rounds raised (a sticky overflow marker, and a proposed expiry that could forget a live helper). No open correctness findings remain.
Agent skill upstream boundary
Notes
No saved field, remote wire field, path, shortcut, or platform-specific operation changes. The execution host owns this state for local, folder, and SSH workspaces. Linux and Windows are covered by CI only.
Checklist