Skip to content

AI: Claude Code fallback to Claude 4 Sonnet is not triggered #175

@johnnydevriese

Description

@johnnydevriese

Summary

Claude Agent will not fallback to use Claude Sonnet 4 when out of Claude Opus 4.1 tokens.

Description

Steps to trigger the problem:

  1. Use all of your Claude Opus 4.1 tokens
  2. Run Zed
  3. Try to make a request to Claude 4 sonnet

Expected Behavior:

I would expect Zed Claude Code Agent to fallback to use Claude Sonnet 4.

Actual Behavior:

Zed Claude Code will not allow me to do anything

Image

Claude Code will fallback to using Sonnet

Image

Model Provider Details

  • Provider: Anthropic with Teams Account
  • Model Name: Claude 4 Sonnet
  • Mode: Agent Panel
  • Other Details (MCPs, other settings, etc): I found a workaround of explicitly setting export ANTHROPIC_MODEL="claude-sonnet-4-20250514" so it never attempts to use Claude Opus 4.1.

Zed Version and System Specs

Zed: v0.204.5 (Zed)
OS: macOS 26.0
Memory: 36 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions