[BUG] Calls to GH CLI are randomly throwing API Error: 413
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When I create a PR via GH CLI, randomly, the application will fail with error code
API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
No other messages will succeed after that:
Create the PR
⎿ API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
Why are you throwing an error 413?
⎿ API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
● Background command "Commit nova template migration" failed with exit code 137.
⎿ API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
What Should Happen?
Claude should create the PR or indicate an error. Claude should also allow a next command to execute.
Error Messages/Logs
API Error: 413 {"error":{"type":"request_too_large","message":"Request exceeds the maximum size"}}
Steps to Reproduce
- Occurs randomly. I cannot define a pattern.
- Request Claude to create a PR.
- Claude executes the following commands:
Bash(git add .)
Bash(git commit -m "feat:.....)
Bash(git push -u origin feature/branch-name)
Bash(gh pr create --title "feat:...." --body "## Summary...) <this command fails>
- Get API Error: 413.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.76 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗