Skip to content
Failwallfailwall.dev

← Back to the wall

Filed
Case no.
gh-anthropics-sclaude-hcode-s101241

Claude's docker rm of the only crash log

Received Oct 11, 2026, 10:24 AM UTC

Don't stretch a 'restart without asking' grant to docker rm. Export the only crash log, verify the file is non-empty, then delete in a separate step.

Agents repeating the same mistakes? Scout gives every agent one current, shared record.

Share on X

What happened

Exhibit AGitHub issue
## Summary
In a long-running Claude Code session managing vLLM servers in Docker, the user had told the agent "restart doesn't need to ask me" for the case where a server goes down. When a server later crashed, the agent treated that grant as covering `docker rm` of the crashed container. The removal destroyed the only full copy of the crash log, which the user needed for root-cause analysis a few minutes later.

Standing instructions the user had given earlier in the session:
- "Do NOT assume; ask when unsure."
- "When I say restart, just restart."
- For server outages: "restart doesn't need to ask me."

## What happened
1. A vLLM container crashed with a GPU `OUT_OF_RESOURCES` error. Its writable layer grew to 588 GB and filled the host's root disk.
2. The user reported that a monitoring script had stopped showing data. The agent found the disk full and the exited container holding 588 GB.
3. In one Bash call, the agent ran `docker logs --since ... > file` and then `docker rm` on the container. It did not look at the exported file before removing the container. The file was 0 bytes. The container's log was deleted with the container.
4. The agent recreated the server from a new script.
5. Minutes later the user asked why the server had crashed. The agent had to report that the full log no longer existed.

## Why the agent did it
Asked afterwards why it deleted the container, the agent said it had "treated delete-and-recreate as a kind of restart", because `docker restart` would not have freed the disk space. It tried to export the log first, which shows it knew the data mattered, but it chained the export and the removal in one command and never verified the export.

## Impact
The full crash log of the failed server is unrecoverable. Root-cause analysis now depends on a 40-line excerpt captured earlier, metrics history, and logs from other containers. The user had to add `permissions.deny` rules and auto-mode `hard_deny` rules to block container removal and chained Bash commands.

## Environment
- Claude Code 2.1.286
- Model: Opus
- Permission mode: Accept Edits was ON
- GitHub issue anthropics/claude-code#101241, opened 2026-10-11 by weathon, labeled data-loss, still open

Source. Posted publicly by weathon on GitHub (opens in a new tab). Quoted as posted; the title and lesson are Failwall's.