Skip to content

feat: cross-family subagents with model and effort selection - #9

Merged
eliahilse merged 1 commit into
mainfrom
feat/subagents
Jul 31, 2026
Merged

feat: cross-family subagents with model and effort selection#9
eliahilse merged 1 commit into
mainfrom
feat/subagents

Conversation

@eliahilse

Copy link
Copy Markdown
Owner

Follow-up to #8 — these commits were pushed to feat/council after it squash-merged, so main has the council without them.

Plain subagents, not just councils

  • agent_spawn — delegate to another model family without naming one: the least-spent capable family is chosen automatically (prefer is a hint, ignored when that family has no quota). Read-only by default, write: true for edits, background: true for a job id. This is the subagent shape — hand it work, get a worker from another lineage on a separate subscription.
  • agent_fanout — several different tasks in parallel, one per family, so independent workstreams spread across subscriptions instead of draining one. Assignment is pure and unit-tested: pinned-first, one family each, reuse only once families run out, and a task pinned to an unavailable family is reported rather than silently rerouted.

The split is now clean: council_* gathers opinions on one question, agent_* does work.

Model and effort control

  • council_models lists which families are summonable and the models/efforts each accepts.
  • model and effort on every delegation tool, applied per engine as real flags (codex -m + -c model_reasoning_effort, grok -m + --reasoning-effort, claude --model) or the model env var for endpoint-routed families. A caller-supplied effort replaces the engine's built-in flag rather than duplicating it.

Two bugs this surfaced

  1. Council asks were broken on codex. They inherited the review path's --output-schema and passed it an empty schema, so every codex consultation 400'd — present in the merged feat: kyora council — summon other model families over MCP #8. Added a chat mode so free-form answers use unconstrained invocations.
  2. The codex model list was invented. My first pass shipped plausible-looking ids the account rejected outright. It now reads the model from the user's own ~/.codex/config.toml (here gpt-5.6-sol), and other families list only ids actually run in testing. Models pass straight through to the vendor CLI, so newer ids work before this package knows them — the list is a hint, not a gate.

Verification

  • codex chat at effort: low answers correctly in 10s (was a hard 400 before the fix)
  • glm honors model: glm-5.2 through the env route
  • all 9 tools register over stdio; 11 council tests + 34 review tests green, types clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01CQy3ZJ5MyUxo4qjZwA93Na

agent_spawn delegates to another model family without the caller
naming one — least-spent capable family wins — and agent_fanout runs
distinct tasks in parallel, one per family. Every delegation tool now
takes model and effort, applied per engine as CLI flags or the model
env var, and council_models lists what each family accepts (Codex
reports the model from the user's own config rather than a guess).

Adds a chat invocation mode: council answers are free-form, so they
must not inherit the review path's --output-schema, which codex
rejected as an empty schema.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CQy3ZJ5MyUxo4qjZwA93Na
@eliahilse
eliahilse merged commit 87723a5 into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant