fix(clients): async questions keep a running thread Working #15430
main fromrefs/pull/15430/head·merged by juliusmarminge View on GitHubOptional async questions made running threads appear to await input even while the provider continued working. Both shell builders now carry a backward-compatible blocking flag. Shared client status and agent awareness keep nonblocking questions Working during live work, then show Input when it ends. Blocking questions, secret requests, and older-server payloads retain Input behavior.
A waiting secret also takes priority over a pending nonblocking question, so an unanswered optional question cannot hide a later secret card. Real blocking runtime requests retain their existing precedence. No provider adapter, request response capability, or general request ordering changed.
Continues @Gigioxx's work in #15430, preserving the author's commits and merging current main. Main's subagent-status field is preserved.
Verification:
- Retained 83 cases across the three existing focused suites (83 before → 83 after), plus 38 existing contract tests and 29 existing snooze tests: 150 pass across five files, including 29 existing snooze cases. Removed duplicate test setup; extended the existing secret lifecycle test for secret-only and coexisting async input in both SQL and memory builders, without new cases or a second status matrix. All main cases remain.
- Main fails the three async-status regressions. Review candidates failed the secret-blocking and overlap assertions; final code passes them. Scoped lint/format and server/contracts/shared/client-runtime/web/mobile package typechecks pass on the applicable final bytes. The existing async case also proves pending input prevents snoozing and wakes an already snoozed thread; no new cases were added for those assertions.
- Five fresh parallel full-PR review rounds with Claude Opus 5.5 and GPT-6-Sol. Confirmed secret classification, overlapping secret, Snooze availability and snooze/wake mismatches were fixed. Both reviewers are clean at final head 85dfbea5.
- Live headless Linux web with actual Codex on final candidate: optional question plus foreground command stays Working; after completion its unanswered question shows Input. A blocking request_secret card shows Input alone and after an unanswered async question in the same run. Both secret cards were declined without entering any value. A running thread snoozed through the real dispatch service wakes when its async question arrives, stays Working, and cannot be snoozed again while the request is pending. Persisted state confirms all verification runs completed. Live state while running.
Before — main labels an async working thread Input:

After — final candidate stays Working with the same pending question:

Before recording · After recording
Snooze → async question wakes the still-working thread.
After completion — the unanswered question shows Input:

A secret card still shows Input, including when an async question is also pending:


Web/desktop and mobile use the shared client presentation; relay awareness consumes the same summary. Live verification covered local Linux web and Codex only. Not exercised: macOS, Windows, iOS, Android, Electron desktop, remote/relay/tunnel or other providers. Main's separate parent-attention behavior for delegated child questions is unchanged. Human maintainer review remains required.
Implemented through T3 Code's Codex harness with GPT-6.1-Sol; tests by GPT-6-Astra; independent reviews by GPT-6-Sol and Claude Opus 5.5 through T3 Code.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
Approvability#
Verdict: Approved at
85dfbeaMacroscope's review found this PR approvable — This is a focused, backwards-compatible fix for how async questions are represented while a run is still working, including matching awareness and snooze behavior. It introduces no new capability, schema migration, deployment change, sensitive-code change, or static-analysis override, and the production logic is covered by targeted tests.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).Warning
Review limit reached#
Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.
Next included review available in 2 minutes.
View limit details
-
Limit details: You’ve used all 10 included reviews currently available.
Review configuration:
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
dbf13116-e1c1-427d-a06a-551dfbf6110a
📥 Commits
-
Reviewing files that changed from the base of the PR and between edd52638fc19b5242b50d2dc1e55969d914122f5 and e40bc3d0faa60b2066227313f19bad1af1ddd7b2.
📒 Files selected for processing: 8
-
apps/server/src/orchestration-v2/ProjectionStore.test.tsapps/server/src/orchestration-v2/ProjectionStore.tspackages/client-runtime/src/state/entities.test.tspackages/client-runtime/src/state/models.tspackages/client-runtime/src/state/threadSettled.tspackages/contracts/src/orchestrationV2.tspackages/shared/src/agentAwareness.test.tspackages/shared/src/agentAwareness.ts
-
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml
- Review profile: CHILL
- Plan: Advanced
- Run ID:
21a2d714-05cb-4872-ac7b-e4fb0aed5b19
📥 Commits
-
Reviewing files that changed from the base of the PR and between 1a9de454b7fb69d0bf225b7888f9f35c976f98cf and edd52638fc19b5242b50d2dc1e55969d914122f5.
📒 Files selected for processing (1)
-
apps/server/src/orchestration-v2/ProjectionStore.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
-
📝 Walkthrough
-
The change adds an optional
blockingfield to pending runtime request summaries. Thread presentation and awareness phase resolution use that field and runtime status to distinguish blocking user input from nonblocking questions.Changes: Async question status
Layer / File(s) Summary Add blocking metadata to pending requests
packages/contracts/src/orchestrationV2.ts,apps/server/src/orchestration-v2/ProjectionStore.ts,apps/server/src/orchestration-v2/ProjectionStore.test.tsThe pending request summary gains an optional blockingfield. Both shell-building paths set it tofalsefor themessageresponse capability andtrueotherwise. Projection tests check both values in SQL-backed and in-memory shells.Present pending input by runtime state
packages/client-runtime/src/state/models.ts,packages/client-runtime/src/state/entities.test.tspresentThreadShellreports pending input for blocking requests, including requests without the field, or when the runtime is inactive. Tests cover blocking, nonblocking, and omitted values.Resolve awareness phase for nonblocking input
packages/shared/src/agentAwareness.ts,packages/shared/src/agentAwareness.test.tsThe resolver keeps an active run in its status phase for explicitly nonblocking user-input requests. The test covers a running thread. Priority: ➖ Normal
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Low
Suggested reviewers:
juliusmarminge
### Architecture SummaryMerge Risk: ⚪ Minimal · up to
edd52-
No merge-blocking issue is identified; the change is ready for normal checks.
Architecture risk: 🔵 Low · up to
edd52The change affects 4 systems.
Changed systems:
apps/server,packages/client-runtime,packages/shared,packages/contractsArchitecture concerns No architecture-level concerns identified.
Review details
-
Systems and components
- observed — apps/server (service) was modified; 2 changed files map to changed impact.
- observed — packages/client-runtime (library) was modified; 2 changed files map to changed impact.
- observed — packages/shared (library) was modified; 2 changed files map to changed impact.
- observed — packages/contracts (library) was modified; 1 changed file maps to changed impact.
Before / after behavior
- observed — Modified behavior in apps/server/src/orchestration-v2/ProjectionStore.ts:
threadShellFromProjectionnow derives the pending request’sblockingvalue from whether its response capability type differs from"message". - observed — Modified behavior in apps/server/src/orchestration-v2/ProjectionStore.ts:
shellFromStateapplies the same response-capability rule when constructing a shell from stored state. - observed — Modified behavior in packages/client-runtime/src/state/entities.test.ts: Added coverage for pending user-input requests: a running shell reports pending input for
blocking: trueor an omittedblockingvalue, but not forblocking: false; a completed shell with no active run reports pending input even when the request is nonblocking. - observed — Modified behavior in packages/client-runtime/src/state/models.ts:
presentThreadShellnow stores the result ofshellRuntimeand considers onlypreparing,starting, andrunningactive for pending-input presentation.
Pre-merge checks:
4 · 1-
Failed checks: 1 warningCheck name Status Explanation Resolution Docstring Coverage Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 7 files. Write docstrings for the functions missing them to satisfy the coverage threshold. Passed checks: 4 passed-
Check name Status Explanation Linked Issues check [ #15258] requires asyncuser_inputquestions to leave a running thread in Working state, while blocking or completed-run questions remain Input.presentThreadShellsuppresseshasPendingUserInput…Out of Scope Changes check The contract field, server projection changes, client-runtime presentation rule, awareness rule, and related tests directly implement or verify [ #15258]. No unrelated change appears in the reviewed pu…Title check The title clearly and concisely describes the primary change: async questions no longer make a running thread appear to await input. Description check The description provides a clear problem statement, implementation summary, scope details, extensive verification results, limitations, and links to related work and evidence. It does not use the temp… Full details: Linked Issues check
-
Explanation
[
#15258] requires asyncuser_inputquestions to leave a running thread in Working state, while blocking or completed-run questions remain Input.presentThreadShellsuppresseshasPendingUserInputonly forblocking: falseduringpreparing,starting, orrunning; omittedblockingremains blocking.ProjectionStoresupplies the flag for both shell projection paths, and the contract keeps it optional for older servers. The shared awareness phase applies the same rule. Existing sidebar, mobile, notification, and snooze consumers usehasPendingUserInput. Tests cover async, blocking, omitted-field, completed-run, shell projection, and awareness cases.
Full details: Out of Scope Changes check
-
Explanation
The contract field, server projection changes, client-runtime presentation rule, awareness rule, and related tests directly implement or verify [
#15258]. No unrelated change appears in the reviewed pull request summary.
Full details: Description check
-
Explanation
The description provides a clear problem statement, implementation summary, scope details, extensive verification results, limitations, and links to related work and evidence. It does not use the template headings and does not explicitly document maintainer approval, but it is otherwise sufficiently complete and directly related to the change.
-
-
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
-
juliusmarminge added labelsmacroscope-review
- apps/server/src/orchestration-v2/ProjectionStore.ts line 1394OutdatedResolvedby Gigioxx(GitHub profile, opens in a new tab)@@ -1391,3 +1391,4 @@13911391 id: pendingRuntimeRequest.id,13921392 kind: pendingRuntimeRequest.kind,13931393 createdAt: pendingRuntimeRequest.createdAt,1394+ blocking: pendingRuntimeRequest.responseCapability.type !== "message",
This changes the server's shell output, but there is no focused server test asserting that a
Posted via Macroscope — Effect Service Conventionsmessageresponse capability producesblocking: falseand a blocking capability producestrue. Could you add projection-store tests for both shell-building paths so the new wire behavior is covered? This needs test changes in addition to this line, so no single-hunk suggestion applies.Added in edd52638fc. The focused projection-store test applies pending user-input requests with message and live response capabilities, then asserts blocking: false and true respectively in both getShellSnapshot and threadShellFromProjection. All 26 projection-store tests pass; server typecheck, scoped lint, and formatting pass.
GPT-6-Astra via T3 Code, on behalf of Guille
Sorry, I'm unable to act on this request because you do not have permissions within this repository.
juliusmarminge assignedjuliusmarminge
Taking over this one. I will rebuild the async-question status fix on current main, retain focused projection and client behavior coverage, and verify the web behavior before pushing here.
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:S
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this1535b12
juliusmarminge closed this
Sign in to join this conversation.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed