Repository navigation
fix: show sessions waiting for concurrency slots - #125654
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 18, 2026, 5:00 AM ET / 09:00 UTC. ClawSweeper reviewWhat this changesThe PR distinguishes admitted work waiting for a concurrency slot from work already executing, then projects and renders that queued state across Gateway, web, Android, and Apple session views. Merge readinessKeep open: current main does not expose a queued session status, and this PR supplies the needed lifecycle projection and client rendering. One model-facing consumer still drops the new status, so the patch needs a narrow follow-up before merge. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway admission records a session before it reaches an execution lane, then session lists, events, and history responses feed web and native clients. The queued state explains that pre-execution interval to operators before it becomes running. flowchart LR
A[Work request] --> B[Gateway admission]
B --> C{Execution lane acquired?}
C -- No --> D[Queued session]
C -- Yes --> E[Running session]
D --> F[Session lists and events]
E --> F
F --> G[Web and native session views]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +157, Tests +359, Docs 0, Other +101. Total +617 across 56 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the lifecycle-owner design, then make queued a first-class status in the model-facing session tool and its focused regression coverage before landing. Do we have a high-confidence way to reproduce the issue? Yes—source inspection shows a queued row returned by Gateway is filtered out by the sessions_list tool’s closed status parser and output schema. Is this the best way to solve the issue? No—the lifecycle projection is the right owner-boundary fix, but it must propagate the new shared status through the model-facing consumer as well. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5fa137ee4737. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
6e68cfd to
8727cb1
Compare
|
Land-ready proof for Root cause and fix: session admission registered visible work before backend execution, but consumers treated every active owner as running. The lifecycle owners now record a sticky execution-start fact; list, event, transcript, and history projections use the canonical queued/running state; web, Workboard, Android, and Apple render queued distinctly. Authentication, credentials, admission policy, and concurrency limits are unchanged. Exact final proof:
ClawSweeper moves:
Visual proof:
Known local gap: the local Judged diff: production +194/-55 (net +139); tests/support +478/-41 (net +437); generated native i18n +41/-0; docs +1/-1. No |
|
Merged via squash.
|
* fix: show sessions waiting for concurrency slots * test: align queued session integration fixtures * test: distinguish queued and reactivated followups * fix: preserve queued state in workboard and android * fix: project queued status through chat history * test(ui): keep queued sidebar case under line cap
What Problem This Solves
Fixes an issue where sessions admitted beyond
agents.defaults.maxConcurrentlooked running or idle even though execution had not started, leaving operators without a reason for the wait.Why This Change Was Made
The execution lifecycle owners now record the exact transition from admitted to started, and session list/event projections expose the pre-execution state as
queued. Web, Android, and Apple render the same protocol state distinctly. This does not change authentication, credentials, admission policy, or concurrency behavior.User Impact
Queued sessions now show Queued, an hourglass, and Waiting for a concurrency slot. They transition to the normal running indicator when backend execution actually starts.
Evidence
queuedtorunningtransition.ChatSwarmProgressTestpassed with the local Android SDK.ChatSessionSidebarModelTestsandChatSwarmProgressTestspassed: 47 tests.SessionObserverDigestTestplus app ktlint; UI typecheck; native i18n verification.chat-history-handler.test.ts1 test and fullchat-send.test.ts302 tests, including queued reconciliation over a prior terminal row.check:changedmacOS tooling configuration emitted no output for 15 minutes on the initial run and the prescribed retry, then exited 143 both times. This local gate is not represented as green; exact-head hosted CI is required before prepare/merge.Before: admitted work looked running
After: queued work explains the wait
Queued to running transition
queued-concurrency-transition-proof.webm