Skip to content

Plumb --model through to claude and codex executors #20

Closed

Description

@bdougie

Problem

--model is silently ignored for the claude and codex providers. Only Ollama honors it:

  • pkg/provider/claude.go — NewExec calls worker.NewClaudeExecutor() with no config
  • pkg/provider/codex.go — same, worker.NewCodexExecutor() takes nothing
  • pkg/worker/claude.go claudeCommand() never passes --model to the CLI

So sweeper run --provider claude --model haiku runs on whatever the CLI's default model is, with no warning.

Proposal

  • Change NewClaudeExecutor / NewCodexExecutor to accept provider.Config (or at minimum the model string) and append --model <x> (claude) / the codex equivalent to the spawned CLI args when set.
  • Thread Config.ExtraArgs through at the same time since the struct already defines it.
  • Record the resolved model in worker.Result / telemetry so sweeper observe can attribute outcomes per model.

Why now

This is the foundation for the advisor/worker model-tiering work (see follow-up issues): planning on a frontier model while workers run on cheap models requires executors that can actually be told which model to use.

Activity

  1. bdougie commented on Jul 4, 2026

    @bdougie
    ContributorAuthor

    PR up: #23

    Two gaps found during verification, deliberately left out of that PR:

    1. VM executor ignores --model — pkg/worker/vm.go hardcodes claude --print --dangerously-skip-permissions when building the in-VM command, so sweeper run --vm --model X silently drops the model the same way the non-VM path used to. Should be fixed the same way (append --model from config) — either as a small follow-up here or folded into Per-role model config and model escalation ladder on stagnation #22's per-role config work.

    2. ExtraArgs has no user-facing config — it's now threaded from provider.Config through both CLI executors, but nothing populates it from TOML or CLI flags yet. Reachable by code (e.g. the advisor in Advisor phase: frontier model plans the sweep, workers execute it #21), not by users.

  2. added a commit that references this issue on Jul 4, 2026
    8ff85e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions