[BUG] Execution Error?
Resolved 💬 3 comments Opened Aug 19, 2025 by deamitzogi1 Closed Aug 27, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.84
- Operating System: Amazon Linux 2
- Terminal: Linux Terminal
Bug Description
At the end of the execution when Claude is meant to print out the result it just says "Execution Error".
Sometimes it does print out the result, but other times it does not:
Steps to Reproduce
- Install Claude Code programmatically
- Run
claude -p -d ---permission-mode acceptEdits 'Write fibonacci code in Python'
Expected Behavior
To print out the Python code consistently rather than every now and then e.g.,:
[DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
[DEBUG] Found 0 hook commands to execute
def fibonacci(n):
if n <= 0:
return 0
elif n == 1:
return 1
else:
return fibonacci(n-1) + fibonacci(n-2)
# Generate first 10 Fibonacci numbers
for i in range(10):
print(fibonacci(i))
[DEBUG] Cleaned up session snapshot: /tmp/claude-npm/.claude/shell-snapshots/snapshot-zsh-1755594721137-r48fts.sh
Actual Behavior
Sometimes it ends with:
[DEBUG] Getting matching hook commands for Stop with query: undefined
[DEBUG] Found 0 hook matchers in settings
[DEBUG] Matched 0 unique hooks for query "no match query" (0 before deduplication)
[DEBUG] Found 0 hook commands to execute
Execution error[DEBUG] Cleaned up session snapshot: /tmp/claude-npm/.claude/shell-snapshots/snapshot-zsh-1755594081835-cm7z4q.shThis issue has 3 comments on GitHub. Read the full discussion on GitHub ↗