Image and Error Handling Conflict Preventing Request Progression
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_erroris 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_erroris 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_erroris 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.
I've been seeing the same issue since a day or two only. Same pattern: ask to check an image > API Error: 400 with the same message as shown above.
Just started for me today. Trying to attach a 500k image throws the error. Once this happens the entire thread is broken preventing any followup messages as the image has been added to context. Each new message (even without an explicit attachment) throws the same error.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.