Skip to content

feat(executor): "Opus plans, Sonnet executes" #2433

@alekspetrov

Description

@alekspetrov

Parent: GH-2432

full implementation - Implement the entire epic as a single consolidated task to avoid merge conflicts. The bulk of changes (Phases 1-4, 6) all touch internal/executor/ (config.go, backend.go, backend_claudecode.go, runner.go, epic.go, hooks.go), and the retry-label work in Phase 5 (internal/github/labels.go, internal/poller/poller.go, internal/autopilot/auto_merger.go) is tightly coupled to the executor changes via shared constants and label lifecycle. Splitting would cause cascade conflicts in runner.go (6 call sites) and config.go (shared struct extensions). Deliverables: (a) extend ClaudeCodeConfig with AllowedTools/MCPConfigPath and add PlanningConfig with claude-opus-4-7 default; (b) extend ExecuteOptions and append --allowedTools/--mcp-config in args builder; (c) populate options at all 6 backend.Execute sites via a buildExecutorOptions helper; (d) modify PlanEpic to pass --model claude-opus-4-7, restrict tools to Read,Grep,Glob, and set ANTHROPIC_MODEL env per-invocation; (e) replace in-memory retryReadyCount with GitHub labels (pilot-retry-1/2/exhausted) and clean them up on merge in auto_merger.go; (f) flip RunTestsOnStop default to false; (g) add tests for planning-model routing, AllowedTools/MCPConfigPath wiring, and retry-label state; (h) verify go build ./... && go test ./... pass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pilotPilot AI will work on this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions