claude-code - 💡(How to fix) Fix [BUG] loop crash [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#49724Fetched 2026-04-17 08:33:13
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1

Error Message

Claude was put to work on a loop, where it task involved non-browser UI development (game on macbook). It was instructed to visually inspect, itself or using other LLM APIs. It managed to put something in its context that caused error repeatedly:

Error Messages/Logs

Code Example

claude --version
2.1.112 (Claude Code)



An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

Baked for 1m 31s

Running scheduled task (Apr 17 3:14am)

An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

※ recap: Building saga2d into "Keras for
  game dev" via the /loop; iter-47 just
  shipped Sprite.follow plus Ring of Pain
  combat animation with 1296 tests green.
  Next iter-48 cron fire will tackle
  motion-aware cross-check. (disable recaps
  in /config)

Running scheduled task (Apr 17 3:18am)

An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

... [REPEATS EVERY 5 minutes]

Running scheduled task (Apr 17 6:34am)

An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

Running scheduled task (Apr 17 6:38am)

An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

/context
Context Usage
    ⛀ ⛁ ⛀ ⛀ ⛁   Opus 4.7 (1M context)
    ⛁ ⛁ ⛁ ⛁ ⛁   claude-opus-4-7[1m]
    ⛁ ⛁ ⛁ ⛁ ⛁   444.2k/1m tokens (44%)
    ⛁ ⛁ ⛁ ⛁ ⛁
    ⛁ ⛁ ⛁ ⛁ ⛁   Estimated usage by category
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 8.6k tokens
     (0.9%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.4k tokens
     (1.6%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 3.4k tokens
    (0.3%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Skills: 756 tokens (0.1%)
    ⛶ ⛶ ⛶ ⛝ ⛝   ⛁ Messages: 425.2k tokens
    (42.5%)
Free space: 512.6k (51.3%)
Autocompact buffer: 33k
    tokens (3.3%)

    MCP tools · /mcp (loaded on-demand)

    Available
    └ mcp__claude_ai_Gmail__authenticate
    └ mcp__claude_ai_Gmail__complete_authent
    ication
    └ mcp__claude_ai_Google_Calendar__authen
    ticate
    └ mcp__claude_ai_Google_Calendar__comple
    te_authentication

    Memory files · /memory
~/.claude/CLAUDE.md: 1.2k tokens
~/ai-workspace/CLAUDE.md: 779 tokens
CLAUDE.md: 1.5k tokens

    Skills · /skills

    Plugin
    └ frontend-design: 67 tokens

     Suggestions
Read results using 303.3k tokens
    (30%) → save ~91k
       Use offset and limit parameters to
    read only the sections you need. Avoid
    re-reading entire files when you only
    need a few lines.
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?

Claude was put to work on a loop, where it task involved non-browser UI development (game on macbook). It was instructed to visually inspect, itself or using other LLM APIs. It managed to put something in its context that caused error repeatedly:

✻ Running scheduled task (Apr 17 6:38am)

⏺ An image in the conversation exceeds the dimension limit for many-image requests (2000px). Run /compact to remove old images from context, or start a new session.

What Should Happen?

claude working in a loop should be robust and compact itself if needed, not put things in its context that crash it without a way for it to recover itself.

Error Messages/Logs

claude --version
2.1.112 (Claude Code)



⏺ An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

✻ Baked for 1m 31s

✻ Running scheduled task (Apr 17 3:14am)

⏺ An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

※ recap: Building saga2d into "Keras for
  game dev" via the /loop; iter-47 just
  shipped Sprite.follow plus Ring of Pain
  combat animation with 1296 tests green.
  Next iter-48 cron fire will tackle
  motion-aware cross-check. (disable recaps
  in /config)

✻ Running scheduled task (Apr 17 3:18am)

⏺ An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

... [REPEATS EVERY 5 minutes]

✻ Running scheduled task (Apr 17 6:34am)

⏺ An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

✻ Running scheduled task (Apr 17 6:38am)

⏺ An image in the conversation exceeds the
  dimension limit for many-image requests
  (2000px). Run /compact to remove old
  images from context, or start a new
  session.

❯ /context
  ⎿ Context Usage
    ⛀ ⛁ ⛀ ⛀ ⛁   Opus 4.7 (1M context)
    ⛁ ⛁ ⛁ ⛁ ⛁   claude-opus-4-7[1m]
    ⛁ ⛁ ⛁ ⛁ ⛁   444.2k/1m tokens (44%)
    ⛁ ⛁ ⛁ ⛁ ⛁
    ⛁ ⛁ ⛁ ⛁ ⛁   Estimated usage by category
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 8.6k tokens
     (0.9%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.4k tokens
     (1.6%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 3.4k tokens
    (0.3%)
    ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Skills: 756 tokens (0.1%)
    ⛶ ⛶ ⛶ ⛝ ⛝   ⛁ Messages: 425.2k tokens
    (42.5%)
                ⛶ Free space: 512.6k (51.3%)
                ⛝ Autocompact buffer: 33k
    tokens (3.3%)

    MCP tools · /mcp (loaded on-demand)

    Available
    └ mcp__claude_ai_Gmail__authenticate
    └ mcp__claude_ai_Gmail__complete_authent
    ication
    └ mcp__claude_ai_Google_Calendar__authen
    ticate
    └ mcp__claude_ai_Google_Calendar__comple
    te_authentication

    Memory files · /memory
    └ ~/.claude/CLAUDE.md: 1.2k tokens
    └ ~/ai-workspace/CLAUDE.md: 779 tokens
    └ CLAUDE.md: 1.5k tokens

    Skills · /skills

    Plugin
    └ frontend-design: 67 tokens

     Suggestions
     ℹ Read results using 303.3k tokens
    (30%) → save ~91k
       Use offset and limit parameters to
    read only the sections you need. Avoid
    re-reading entire files when you only
    need a few lines.

Steps to Reproduce

unclear

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.112

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

extent analysis

TL;DR

Run the /compact command to remove old images from the context and alleviate the dimension limit exceeded error.

Guidance

  • The error message suggests that an image in the conversation exceeds the dimension limit for many-image requests (2000px), and running /compact may resolve the issue.
  • Check the context usage by running /context to understand the current token usage and identify potential areas for optimization.
  • Consider using the offset and limit parameters when reading files to reduce token usage, as suggested in the context usage output.
  • If the issue persists, try starting a new session to reset the context and token usage.

Example

No code snippet is provided as the issue is related to the Claude Code API and its usage.

Notes

The issue seems to be related to the dimension limit exceeded error, which can be resolved by running the /compact command. However, the root cause of the issue, such as why the image is being added to the context, is unclear.

Recommendation

Apply the workaround by running the /compact command to remove old images from the context, as this is the most straightforward solution to alleviate the dimension limit exceeded error.

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