fix(tui): v0.9.8 stabilization — turn-owned agents, compaction quality, Blue Stage web - #5399
fix(tui): v0.9.8 stabilization — turn-owned agents, compaction quality, Blue Stage web#5399Hmbown wants to merge 4 commits into
Conversation
Default agent starts use child_runtime so parent-turn cancellation propagates. Explicit detached=true keeps background_runtime durability. On Interrupted turns the engine cancels and joins turn-owned children before TurnComplete. Model-facing agent calls now require action; legacy prompt-only parsing remains available for stored/programmatic use. Assisted by Cursor. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
Empty, whitespace-only, punctuation-only, placeholder, and non-text compaction results no longer replace real history. Quality-gate failures retry inside compact_messages_safe and count toward retries_used. Assisted by Cursor. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
codewhale web no longer tears down a healthy Runtime if the OS browser opener fails. It prints the single-use bootstrap URL and keeps serving. Bootstrap TTL is ten minutes for manual recovery. Assisted by Cursor. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
SSE gap state clears only after snapshot+resubscribe succeed. Mobile thread rail is a real modal drawer (inert, Escape, focus trap/restore) with visualViewport sizing and coarse 44px targets. User questions keep TUI Other+cardinality and bind to the live thread. Long MCP failures stay compact/expandable. Stream updates preserve disclosures and mute token-stream aria announcements. Client tests: 25/25. Assisted by Cursor. Co-authored-by: Hunter Bown <Hmbown@users.noreply.github.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
Claude finished @Hmbown's task in 3m 30s —— View job Review completeTodo list
SummaryDiffed the 4 PR commits against their common base ( 1. Turn-owned subagents (
2. Compaction quality gate (
3. Blue Stage web client (
4. Tests No blocking issues found. Nice adherence to the do-not-delete guardrails and no touches to the removed |
|
Not the v0.9.8 candidate. This was reconstructed without the local worktrees. Finish from /Volumes/VIXinSSD/CW/worktrees/v098-bugfix-convergence and v099-rust-tightening against origin/main ad102ec. Do not land this. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 08e4eb538b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .filter(|(_, agent)| { | ||
| !agent.detached | ||
| && agent.status == SubAgentStatus::Running | ||
| && !agent.completion_claimed |
There was a problem hiding this comment.
Restrict cancellation to children owned by this turn
Track and filter by the initiating turn rather than treating every non-detached agent as owned by whichever turn is interrupted. A child intentionally left running after successful turn A is still detached == false, so interrupting a later unrelated turn B reaches this filter and aborts A's work; the same global manager can also contain non-detached descendants of other active agents.
Useful? React with 👍 / 👎.
| } | ||
| }, | ||
| "required": [] | ||
| "required": ["action"] |
There was a problem hiding this comment.
Include the start action in
/agent-generated calls
Making action mandatory breaks the existing /agent [N] <task> flow when the model follows its generated instruction literally: crates/tui/src/commands/groups/core/agent.rs:61-63 tells it to call agent with only name, prompt, and max_depth, and this new requirement then rejects that call instead of starting the requested worker. Update that instruction and other programmatic prompts to include action: "start" before enforcing the requirement.
Useful? React with 👍 / 👎.
| if (!subscribed) return; | ||
| // Gap state clears only after both the replacement snapshot and the | ||
| // resubscription have succeeded. | ||
| app.streamGap = false; |
There was a problem hiding this comment.
Wait for EventSource open before clearing the gap
Do not clear streamGap merely because connectStream constructed an EventSource. Connection failures are reported asynchronously through onerror, so a rejected or unreachable resubscription reaches this line, marks continuity restored, and even displays “connected” before onopen; the later error path reconnects without restoring the gap flag. Clear it from the matching stream's onopen callback instead.
Useful? React with 👍 / 👎.
| case "stale-user-input": | ||
| return "That question was already answered or has expired — nothing was sent."; | ||
| case "no-approval": | ||
| return "No approval was identified — nothing was sent."; | ||
| default: | ||
| case "no-user-input": | ||
| return "No pending question was identified — nothing was sent."; |
There was a problem hiding this comment.
Localize the new browser status messages
Route these newly added refusal messages, along with the other new recovery and disclosure labels in this web-client change, through the locale/message catalog rather than returning hardcoded English. Otherwise users running a non-English locale receive English status and attention copy, contrary to the repository's localization contract for every user-visible render-path string.
AGENTS.md reference: crates/tui/AGENTS.md:L36-L41
Useful? React with 👍 / 👎.
Summary
Reconstructs the still-missing CodeWhale v0.9.8 Rust stabilization onto current
main(post #5393/#5394/#5395). No version bump, tag, release, TypeScript runtime, or unrelated features.Fixes
1. Turn-owned default direct subagents
Default
agentstarts usechild_runtime(parent-turn cancel propagates). Explicitdetached=truekeepsbackground_runtimedurability. OnInterruptedturns the engine cancels and joins turn-owned children beforeTurnComplete.Files:
crates/tui/src/tools/subagent/mod.rs,crates/tui/src/tools/subagent/tests.rs,crates/tui/src/core/engine.rs,docs/SUBAGENTS.md2. Compaction quality gate
Empty / whitespace-only / punctuation-only / placeholder / non-text summaries cannot replace real history. Quality-gate failures retry inside
compact_messages_safeand count towardretries_used.Files:
crates/tui/src/compaction.rs3. Model-facing
agentrequiresactionLive schema/parser require
action. Stored/programmatic legacy parsing (parse_agent_tool_action_legacy) still treats missing action as Start.Files:
crates/tui/src/tools/subagent/mod.rs,crates/tui/src/tools/subagent/tests.rs4–10. Embedded Blue Stage web client (CWC)
streamGapclears only after snapshot and resubscription succeedvisualViewportsizing, coarse 44px targetsaria-live="off"(transcript is not a polite live region)Files:
crates/tui/src/runtime_web/app.mjs,index.html,styles.css,crates/tui/tests/runtime_web_client.test.mjs,crates/tui/src/runtime_api.rs,crates/tui/src/runtime_api/web.rs,docs/WEB.mdOut of scope (per brief)
open_secure_regular_filefixture PRTesting
cargo fmt --all -- --checknode --check crates/tui/src/runtime_web/app.mjsnode --test crates/tui/tests/runtime_web_client.test.mjs→ 25/25cargo test -p codewhale-tui --libfilters for compaction quality, agent action, turn-owned/detached spawn, bootstrap TTL, andagent_tool_schema/lifecycleChecklist
docs/SUBAGENTS.md,docs/WEB.md)