1M context not activating in large monorepo, works in subdirectory

Resolved 💬 3 comments Opened Mar 17, 2026 by gongpyung Closed Mar 21, 2026

Bug Description

On a Max plan with Opus 4.6, the 1M context window does not activate when running Claude Code from a large monorepo root directory, but it works correctly in a small subdirectory (separate git repo) within the same parent folder.

Environment

  • Plan: Claude Max
  • Model: Opus 4.6
  • Claude Code version: v2.1.77
  • OS: Windows 11 Enterprise
  • Shell: bash (Git Bash)

Steps to Reproduce

  1. Open Claude Code in a large monorepo root (~5.5GB .git directory)
  2. Check model: /model shows Opus 4.6 (default) — no 1M context
  3. Try to activate 1M manually: /model opus[1m]
  4. Error: Opus 4.6 with 1M context is not available for your account. Learn more: https://code.claude.com/docs/en/model-config#extended-context-with-1m
  5. Open Claude Code in a small subdirectory (separate git repo, ~few MB .git)
  6. /model shows Opus 4.6 (1M context) — 1M context is active automatically

Expected Behavior

According to the documentation:

On Max, Team, and Enterprise plans, Opus is automatically upgraded to 1M context with no additional configuration.

1M context should activate regardless of repository size.

Actual Behavior

  • 1M context does not activate in the large monorepo
  • The error message says "not available for your account" which is misleading — it works fine on the same account from a different directory
  • No CLAUDE_CODE_DISABLE_1M_CONTEXT is set
  • No availableModels restriction is configured
  • No project-level settings override the model

Troubleshooting Done

  • Removed .mcp.json → still no 1M
  • Removed project .claude/settings.local.json → still no 1M
  • Removed .claude/docs/ directory → still no 1M
  • Verified no environment variables blocking 1M
  • Verified no availableModels restrictions in any settings file

Additional Context

The only difference between the two directories is the git repository size and the presence of a .claude/ directory with project-specific settings (none of which affect model selection). The same Max plan account is used in both cases.

View original on GitHub ↗

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