SendMessage ignores model specified at Agent creation, falls back to default

Resolved 💬 3 comments Opened Apr 8, 2026 by labzink Closed Apr 12, 2026

Description

When creating a subagent via Agent(), you can specify a model (model: "haiku", model: "sonnet", etc.). The agent launches on the chosen model correctly. However, when resuming the same agent via SendMessage(), the model is not inherited — instead, the system's default model is used (e.g., Sonnet if configured as default), regardless of both the original Agent() model choice and the orchestrator's model.

Reproduction

  1. Configure Claude Code with Opus as orchestrator and Sonnet as the default model
  2. Spawn a subagent with an explicit model:

``
Agent(name: "worker", model: "haiku", prompt: "Do something")
``

  1. Agent runs on haiku — OK
  2. Resume via SendMessage(to: "<agent-id>", message: "Next task")
  3. Agent now runs on sonnet (the system default) instead of haiku

Observed behavior

  • Agent(model: "haiku") → runs on haiku ✅
  • SendMessage() to the same agent → switches to the system default model (not the orchestrator's model, not the agent's original model)
  • The agent's accumulated context is now fed into a different model

Expected behavior

The model specified at Agent() creation should persist for the entire lifecycle of that agent. SendMessage should automatically use the same model as the original Agent() call.

At minimum, one of:

  1. Preferred: SendMessage inherits the model from the original Agent() call
  2. Alternative: add a model parameter to SendMessage so the model can be explicitly set on resume

Why this matters

  • Cost: agent was created on haiku (cheap) for simple tasks, but on resume silently switches to sonnet/opus — cost increases 5-60x with no indication
  • Inconsistency: a subagent = context + role + model. On resume, context is preserved but model is lost — this breaks the "long-lived agent" abstraction
  • No workaround: SendMessage has no model parameter, so there's no way to manually fix this

Environment

  • Claude Code CLI (latest)
  • Orchestrator: claude-opus-4-6
  • Default model in config: claude-sonnet-4-6
  • Subagent: created with model: "haiku"
  • OS: macOS 13.5

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗