Skip to content

Crew planner/workers default to Claude instead of inheriting the host session model #20

Description

@velinussage

Summary

When the host pi session runs on a non-Anthropic provider (e.g. openai-codex/gpt-5.5), the crew planner and workers still default to a Claude model rather than inheriting the session's current model. This forces per-project config.models workarounds and, when the user has no/limited Anthropic credit, breaks the crew entirely (the planner 4xx then loops — see companion issue).

Where

Model resolution falls back to the agent's hardcoded (Claude) model:

  • crew/agents.ts:206const model = task.modelOverride ?? config.models?.[role] ?? agentConfig?.model;
  • crew/lobby.ts:72const model = config.models?.worker ?? workerConfig.model;

The host session model is already available to the extension:

  • store.ts:427const currentModel = ctx.model?.id ?? reg.model;

Repro

  1. Run pi with --provider openai-codex --model gpt-5.5 (no Anthropic usage).
  2. pi_messenger({ action: "plan" }).
  3. Planner spawns on a Claude model and fails despite gpt-5.5 being fully available.

Ask

Default crew roles (planner/worker/reviewer/analyst) to the host session model (ctx.model?.id) when there is no explicit task.modelOverride / config.models[role]. Keep config.models as an explicit override. "Same model as the session" is the least-surprising default.

Workaround

Set crew.models.* to the session model in ~/.pi/agent/pi-messenger.json (global) or <project>/.pi/messenger/crew/config.json (per-project).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions