Image and Error Handling Conflict Preventing Request Progression

Status Fixed / completed
Maintainer reply None cached
Activity 4 comments · opened May 5, 2025 · closed Nov 30, 2025

Bug Description
If it decides to attach an image, but also creates an error on the same request, you get stuck in a situation where you can't proceed or even /compact

⏺ Call(Check output images and encoder CLI options)…
⎿  Read(../test_output/checkerboard_original.png)…
⎿  Read(../test_output/checkerboard_config4_decoded.png)…
⎿  Bash(/Users/toasty/Projects/curve4-claude/build/src/tools/encoder_cli --help)…
⎿  Error: (eval):1: no such file or directory: /Users/toasty/Projects/curve4-claude/build/src/tools/encoder_cli
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.20.content.0.tool_result: content cannot contain image blocks
if is_error is true"}}

That didn't seem to work

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.20.content.0.tool_result: content cannot contain image blocks
if is_error is true"}}

Can you retry with the correct path?

⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.20.content.0.tool_result: content cannot contain image blocks
if is_error is true"}}

/compact

⎿ Error: Error during compaction: Error: API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"messages.20.content.0.tool_result: content cannot contain image blocks if is_error is
true"}}

Environment Info

  • Platform: macos
  • Terminal: iTerm.app
  • Version: 0.2.101
  • Feedback ID: 85d45c33-baab-431d-b6c6-787bdb8e47cf

Errors

[{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11070)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:339)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:1058\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-05T21:31:05.609Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readSync (node:fs:742:18)\n    at Object.readSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11243)\n    at UW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:519:260)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:321)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:1058\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-05T21:31:05.609Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11070)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:339)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:1058\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-05T21:31:05.609Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readSync (node:fs:742:18)\n    at Object.readSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11243)\n    at UW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:519:260)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:321)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:1058\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-05T21:31:05.609Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:443:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11070)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:339)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:1058\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-05T21:31:05.609Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readSync (node:fs:742:18)\n    at Object.readSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:512:11243)\n    at UW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:519:260)\n    at JY (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:521:321)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1119:105

Note: Error logs were truncated.

View original on GitHub ↗

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