claude-code - 💡(How to fix) Fix [BUG] ❯ cant /branch even after /compact [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#49508Fetched 2026-04-17 08:39:08
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
2
Timeline (top)
labeled ×4commented ×1

Error Message

Error Messages/Logs

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

❯ /branch ⎿ Failed to branch conversation: Conversation transcript is too large to branch (77253918 bytes)

What Should Happen?

Should /branch after /compact

Error Messages/Logs

Steps to Reproduce

/branch after /compact on a long claude CLI session

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

v2.1.112

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

No response

extent analysis

TL;DR

The issue can likely be mitigated by compacting the conversation transcript to reduce its size before attempting to branch.

Guidance

  • The error message suggests that the conversation transcript exceeds a certain size limit, causing the branching operation to fail.
  • To verify this, try compacting the conversation transcript using the /compact command and then attempt to branch again to see if the issue resolves.
  • If the issue persists, investigate the size limit for conversation transcripts in the Claude Code documentation or Anthropic API documentation to understand the constraints.
  • Consider breaking down long conversations into smaller segments to avoid hitting the size limit.

Example

No code snippet is provided as the issue does not involve custom code, but rather interaction with the Claude CLI.

Notes

The fix may not be applicable if the size limit is a hard constraint and the conversation transcript cannot be compacted further. Additionally, the lack of information on the last working version and additional context may limit the ability to provide a more targeted solution.

Recommendation

Apply workaround: Compact the conversation transcript before branching to mitigate the issue, as the root cause seems to be related to the transcript size exceeding a certain limit.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING