[Bug] Subagent inherits parent's context window size instead of model default

Resolved 💬 3 comments Opened Apr 30, 2026 by Nickcom4 Closed May 31, 2026

Bug Description
Looking at the error path more carefully: the dispatcher (my session) is on opus-4-7[1m], and the dispatch system appears to inherit the 1M
context budget into the subagent regardless of the requested model name. Sonnet doesn't natively carry 1M, so when asked to run with 1M context it routes through the extra-usage flag.

I don't have a knob from inside the dispatch to say "spawn this subagent with standard context, not the parent's." The model parameter selects model family, not context size.

Environment Info

  • Platform: darwin
  • Terminal: kitty
  • Version: 2.1.123
  • Feedback ID: b905b3a7-c7e9-4f69-b102-0a33ec0c4adf

Errors

[{"error":"Error: NON-FATAL: Lock acquisition failed for /Users/nick/.local/share/claude/versions/2.1.123 (expected in multi-process scenarios)\n    at x86 (/$bunfs/root/src/entrypoints/cli.js:2769:2177)\n    at Jw8 (/$bunfs/root/src/entrypoints/cli.js:2769:1257)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T12:09:26.217Z"},{"error":"Error: Request was aborted.\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:3448)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T19:45:46.035Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/nick/repos/ese-plugin/.claude/worktrees/agent-a0500bf37a55c0e10.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4865:7658)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T20:07:18.217Z"},{"error":"MaxFileReadTokenExceededError: File content (81716 tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file, or search for specific content instead of reading the whole file.\n    at Km7 (/$bunfs/root/src/entrypoints/cli.js:4852:12789)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T20:17:39.948Z"},{"error":"Error: File does not exist. Note: your current working directory is /Users/nick/repos/ese-plugin/.claude/worktrees/agent-af14f717a472a736f.\n    at call (/$bunfs/root/src/entrypoints/cli.js:4865:7658)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T20:18:12.014Z"},{"error":"Error: Failed to delete keychain entry: security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n    at USq (/$bunfs/root/src/entrypoints/cli.js:256:287818)\n    at async I99 (/$bunfs/root/src/entrypoints/cli.js:409:898)\n    at async Si6 (/$bunfs/root/src/entrypoints/cli.js:409:796)\n    at async K$_ (/$bunfs/root/src/entrypoints/cli.js:2745:2257)\n    at async a0H (/$bunfs/root/src/entrypoints/cli.js:2770:6041)\n    at async <anonymous> (/$bunfs/root/src/entrypoints/cli.js:2794:3410)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T20:20:07.865Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaYrtjV9Nmdkfb48zGMed\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:57915)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:35:48.547Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaYrtnqYv23efVJJjuMoM\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:57915)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:35:49.630Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\"request_id\":\"req_011CaYrtuTfiQnC8EjkEjjPb\"}\n    at generate (/$bunfs/root/src/entrypoints/cli.js:11:57915)\n    at makeRequest (/$bunfs/root/src/entrypoints/cli.js:50:4943)\n    at processTicksAndRejections (native:7:39)","timestamp":"2026-04-29T22:35:50.836Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"},\…

Note: Content was truncated.

View original on GitHub ↗

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