[BUG] Calls to GH CLI are randomly throwing API Error: 413

Resolved 💬 3 comments Opened Dec 24, 2025 by frankbria Closed Dec 27, 2025

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

  1. Occurs randomly. I cannot define a pattern.
  2. Request Claude to create a PR.
  3. 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>

  1. 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_

View original on GitHub ↗

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