Interactive session crashes with compound instructions in Docker + --dangerously-skip-permissions
Resolved 💬 6 comments Opened Dec 15, 2025 by ykdojo Closed Feb 28, 2026
Summary
Interactive Claude Code sessions crash silently when using compound instructions (e.g., "read X and summarize") inside a Docker container with --dangerously-skip-permissions.
Environment
- Claude Code v2.0.69
- Docker base image:
node:22-slim - Claude Code installed via:
npm install -g @anthropic-ai/claude-code - Running as non-root user
- Model: Sonnet 4.5
Steps to Reproduce
- Create a Docker container with Claude Code:
FROM node:22-slim
RUN npm install -g @anthropic-ai/claude-code
RUN useradd -m -s /bin/bash testuser
USER testuser
- Create any file (even empty):
touch /tmp/test.txt - Start interactive session:
docker exec -it <container> claude --dangerously-skip-permissions - Type:
read /tmp/test.txt and summarize - Press Enter twice (to submit)
Result: Session terminates silently
What Works vs What Crashes
| Command | Result |
|---------|--------|
| read file.txt | ✅ Works |
| read file.txt and summarize | ❌ Crashes |
| read file.txt, then summarize | ❌ Crashes |
| read file.txt. Now summarize. | ✅ Works |
| read nonexistent.txt and summarize | ✅ Works (file doesn't exist) |
Key Findings
The crash requires ALL of these conditions:
- Running inside Docker container
--dangerously-skip-permissionsflag enabled- Compound instruction with "and" or comma
- File must exist
Does NOT crash:
- Same commands on host machine (outside Docker)
- Same commands without
--dangerously-skip-permissions - Period-separated sentences instead of "and"
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗