agency-picks-claude

Agency picks claude executor for local: model — SpawnPlan inherits mismatch (autohaiku 100% failure)

Metadata

Statusdone
Assignedagent-164
Agent identity3184716484e6f0ea08bb13539daf07686ee79d440505f1fdf2de0357707034c3
Created2026-04-26T23:08:19.393268063+00:00
Started2026-04-26T23:13:03.152880045+00:00
Completed2026-04-26T23:59:05.300956648+00:00
Tagseval-scheduled
Eval score0.91
└ blocking impact0.95
└ completeness0.95
└ constraint fidelity0.85
└ coordination overhead0.95
└ correctness0.95
└ downstream usability0.90
└ efficiency0.85
└ intent fidelity0.88
└ style adherence0.90

Description

Description

In ~/autohaiku, dispatcher's SpawnPlan log shows:

[dispatcher] implement-haiku-generation-module: SpawnPlan executor=claude (from agency.effective_executor), model=local:qwen3-coder (from dispatcher.default_model), endpoint=none (none (executor=claude))

Then claude CLI gets --model qwen3-coder (after stripping the local: prefix) and returns 404: 'There's an issue with the selected model (qwen3-coder). It may not exist or you may not have access to it.'

Agency chose executor=claude but the model is local:qwen3-coder — that combo CANNOT WORK. claude CLI doesn't know qwen3-coder; it only knows opus/sonnet/haiku and Anthropic-hosted variants. The model's local: prefix says explicitly 'this model lives at a local OAI-compat endpoint, not Anthropic.' Routing it through claude CLI = guaranteed 404.

100% failure rate on autohaiku tasks because of this. SpawnPlan is doing its job (honoring agency.effective_executor as the floor) — the bug is in the agency's executor selection: it should never pick claude executor for a model with the local: prefix.

Fix

In the agency's effective_executor resolution (likely src/agency/ or wherever 'agency.effective_executor' is computed for SpawnPlan):

  • If the model spec has prefix local: or openrouter: or oai-compat: (anything non-claude/non-anthropic), the agency CANNOT pick claude executor regardless of role/tradeoff defaults. Force a compatible executor (native for local/openrouter, etc).
  • If the agency's role/tradeoff implies claude executor BUT the model is incompatible, log a clear conflict warning and either (a) override executor to compatible, OR (b) override model to a claude-compatible default (per dispatcher tier config).

Option (a) is safer — preserves the user's model choice.

Add a clear log line on the conflict resolution: 'Agency picked executor=claude for role X but model local:qwen3-coder requires native; routed to native.'

Hard gate

Before claiming done:

  1. In a scratch dir: wg init -m qwen3-coder -e https://lambda01.tail334fe6.ts.net:30000 -x nex; wg service start
  2. wg add 'simple test task' -d 'echo hello world'
  3. wg publish simple-test-task
  4. Wait for dispatch
  5. Daemon log MUST show SpawnPlan with executor=native (not claude); agent metadata MUST show executor=native; task MUST succeed (or fail for a non-routing reason)

Validation

  • Failing test first: test_agency_does_not_pick_claude_for_local_model — given a model spec with local: prefix and an agency role that defaults to claude, effective_executor returns native (not claude)
  • Implementation: agency executor selection respects model-prefix compatibility constraints
  • cargo build + cargo test pass with no regressions
  • HARD GATE manual smoke as above

Depends on

Required by

Log