fix(subagent): clearer role vocab, lifecycle signals, and eval ergonomics

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).
This commit is contained in:
Hunter Bown
2026-06-03 11:22:56 -07:00
parent 03d1bba538
commit 725abeb603
6 changed files with 281 additions and 27 deletions
+3 -2
View File
@@ -86,10 +86,11 @@ The model can spell each role multiple ways:
|---------------|------------------------------------------------------------------|
| `general` | `worker`, `default`, `general-purpose` |
| `explore` | `explorer`, `exploration` |
| `plan` | `planning`, `awaiter` |
| `review` | `reviewer`, `code-review` |
| `plan` | `planning`, `planner`, `awaiter` |
| `review` | `reviewer`, `code-review`, `code_review` |
| `implementer` | `implement`, `implementation`, `builder` |
| `verifier` | `verify`, `verification`, `validator`, `tester` |
| `tool_agent` | `tool-agent`, `toolagent`, `executor`, `execution`, `fin` |
| `custom` | (none; explicit `allowed_tools` array required) |
All matching is case-insensitive. Unknown values produce a typed