fix(subagent): clearer role vocab, lifecycle signals, and eval ergonomics (v0.8.53)#2684
fix(subagent): clearer role vocab, lifecycle signals, and eval ergonomics (v0.8.53)#2684Hmbown wants to merge 1 commit into
Conversation
…mics Make the sub-agent surface easier for less-capable models to drive: - Unify role/type vocabulary (#2649): normalize_role_alias now accepts the full set SubAgentType::from_str accepts (reviewer/implementer/verifier/...), and SubAgentType::from_str learns `planner`, so the dual-validation pass no longer rejects natural roles with a stale four-value hint. Error strings and schema descriptions now enumerate the real accepted aliases. - agent_eval/agent_close always active (#2605) so a first call executes instead of hydrating its schema and forcing a double-invoke; both accept an `agent_name` session alias (#2650). - Self-diagnosing name conflicts (#2656): the duplicate-name error names the conflicting agent_id and its status. - Self-describing completion sentinels (#2658): subagent.done now carries result_clipped / summary_complete / next_action so the parent knows whether to trust the previous-line summary or call agent_eval. - Actionable child-model-unavailable diagnostics (#2653): a provider 403/404 is annotated with the model id and recovery path instead of a bare error. Tests: role vocabulary acceptance + error wording, agent_name resolution, duplicate-name diagnostics, clipped-result sentinel, child-model annotation, agent_eval/agent_close default-active. Full tui suite green (3948), clippy clean. Targets codex/v0.8.53 (v0.8.53 stabilization).
There was a problem hiding this comment.
Hmbown has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
There was a problem hiding this comment.
Code Review
This pull request enhances the sub-agent management system by keeping agent_eval and agent_close active to prevent double-invoking, expanding and aligning the accepted role aliases (e.g., adding planner, reviewer, verifier, and tool_agent aliases), and introducing self-describing completion fields (result_clipped, summary_complete, next_action) to the sub-agent sentinel. It also improves error handling by annotating child model access errors with actionable recovery hints and providing clearer duplicate session name errors. Relevant tests and documentation have been updated accordingly. There are no review comments to address, so no additional feedback is provided.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Part of the v0.8.53 stabilization cycle (PR group 3 — subagent usability & lifecycle). Targets the integration branch
codex/v0.8.53.Issues addressed
normalize_role_aliasnow accepts the full set thatSubAgentType::from_straccepts (reviewer,implementer,verifier, …), andfrom_strlearnsplanner. The dual-validation pass no longer rejects a natural role (e.g.role: "reviewer") with a staleworker, explorer, awaiter, defaulthint. All four role-error strings and the four model-facing schema descriptions now enumerate the real accepted vocabulary.agent_eval/agent_closeare now inDEFAULT_ACTIVE_NATIVE_TOOLS, so a first call executes instead of hydrating its schema and forcing a deferred double-invoke.agent_eval/agent_closeaccept anagent_namealias for the session name (the field models naturally reach for).agent_idand its status, so a model can recover deterministically.<codewhale:subagent.done>sentinel now carriesresult_clipped/summary_complete/next_action(use_summaryvscall_agent_eval), kept lean (no embedded result).base.mdintegration-protocol prose updated to match.Authorization/State) is annotated with the model id and recovery path instead of surfacing a bare error.Scope / deconfliction
normalize_role_alias+ role-error-string change for the cycle. The WS5 tool/deferred/error UX PR (tools: validation errors still leave agents doing schema trial-and-error #2659) will only addlikely_field_correctionsentries, so the two do not collide.DEFAULT_ACTIVE_NATIVE_TOOLSadditions are alphabetical (agent_close/agent_evalbeforeagent_open), keeping the prefix-cache partition sorted/byte-stable; non-overlapping with the WS5git_log/git_showadditions.Verification
cargo test -p codewhale-tui --bins→ 3948 passed, 0 failed.cargo clippy -p codewhale-tui --bins→ clean.agent_namesession resolution, duplicate-name diagnostics, clipped-result sentinel, child-model annotation, andagent_eval/agent_closedefault-active.🤖 Generated with Claude Code