[Bug] Subagent token inheritance not working correctly
Resolved 💬 3 comments Opened Mar 25, 2026 by heymumford Closed Mar 29, 2026
Bug Description
Subagent token inheritance is broken.
- Subagent token inheritance is broken — child processes should either share the token via a file/IPC mechanism
instead of env var copy, or have their own refresh capability
- The error message is misleading — "OAuth authentication is currently not supported" sounds like a feature flag,
not a token expiry. Should say "session token expired" or "authentication token invalid"
- Token refresh should be atomic and observable — when the parent refreshes, it should write the new token to a
shared file that subagents can read
- 401 for active sessions should trigger auto-retry — before giving up, Claude Code should attempt one token
refresh and retry
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.1.83
- Feedback ID: e6c2dc1d-a098-4b2d-8bd4-112f9b46b136
Errors
[{"error":"MaxFileReadTokenExceededError: File content (103497 tokens) exceeds maximum allowed tokens (10000). 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 K69 (/$bunfs/root/src/entrypoints/cli.js:4172:23677)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T12:39:33.796Z"},{"error":"MaxFileReadTokenExceededError: File content (101672 tokens) exceeds maximum allowed tokens (10000). 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 K69 (/$bunfs/root/src/entrypoints/cli.js:4172:23677)\n at processTicksAndRejections (native:7:39)","timestamp":"2026-03-25T12:39:54.680Z"}]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗