STUPID-2026-0074
Copilot CLI destroyed its own 233MB session log trying to "back it up" with a hardlink instead of a copy
Why 5/10
The agent destroyed its own 233 MB raw session log. The session itself, and the user's work, survived.
- Scope
- 0/4
- Time, tokens or the agent's own working state only
- Recoverability
- 3/3
- Permanently lost or irreversible, including data that was exposed
- Did it happen
- 2/2
- Happened in real use
- Beyond the user
- 0/1
- Only the user's own non-production work
The score is the sum of these four factors. How each factor is scored · scored 2026-10-29
Instruction given
No explicit instruction for this step — the agent was working autonomously within a long-running (~1200 turn) Copilot CLI session and decided on its own to truncate its bloated events.jsonl log to relieve a CPU-pinning issue it was also trying to diagnose, first attempting to preserve the old contents as a backup.
Expected behavior
Before truncating a large log file "as a backup," make an independent copy of it (e.g. with `cp`), not a hardlink — a hardlink shares the same inode as the original, so truncating either name truncates both.
Actual behavior
The agent ran `ln events.jsonl events.jsonl.bak-20260624` followed by `: > events.jsonl` to truncate the live log after "backing it up." Because `ln` creates a hardlink rather than an independent copy, both the original file and the supposed backup shared the same inode, so truncating one truncated both simultaneously.
Damage
The full 233MB raw events.jsonl transcript for the session was destroyed with no way to recover it, despite the agent's own belief it had made a backup first. The session itself was not lost — plan.md, checkpoints/, session.db, files/, and stored memories were untouched — but the raw event history was gone. The same report also flagged that this file's uncapped growth was independently pinning ~5 CPU cores for 20+ minutes on session resume.
Full write-up
While troubleshooting a separate performance problem in a long-running Copilot CLI session — an events.jsonl log that had grown to 233MB over roughly 1,200 turns and was pinning multiple CPU cores on resume — the agent tried to shrink the file safely by making a backup first. It ran ln events.jsonl events.jsonl.bak-20260624 to create what it treated as a backup copy, then truncated the original with : > events.jsonl. A hardlink doesn't create an independent copy; it creates a second name pointing at the same inode, so truncating the "original" truncated the "backup" right along with it. The entire 233MB raw transcript was destroyed in the process the agent had chosen specifically to preserve it. The reporter, who filed the issue against GitHub's own copilot-cli repository, noted the session survived because its plan file, checkpoints, session database, and stored memories lived elsewhere — but the full event history did not, and there was no way to get it back. The filer suggested the project either document that ln is not a backup primitive (recommending cp instead) or ship a proper /session-archive command so agents don't need to improvise file-level backup tricks on a live session.
Classification
- Agent
- GitHub Copilot
- Failure mode
- Destructive Action
- Root cause
- Tool Misuse
- Domain
- Data
- OWASP Agentic Top 10 (our mapping)
- ASI02 Tool Misuse and Exploitation list
- MIT AI Risk Repository (our mapping)
- 7.3 Lack of capability or robustness taxonomy
- Source
- Github Issue
Related incidents
Cite this record
StupidLLM. "STUPID-2026-0074: Copilot CLI destroyed its own 233MB session log trying to "back it up" with a hardlink instead of a copy." AI Agent Incident Database, 2026. https://www.stupidllm.com/incident/STUPID-2026-0074/ (accessed 2026-11-11). CC BY 4.0.
← STUPID-2026-0073By IDSTUPID-2026-0075 →
Get told when an agent breaks something
We document AI agent failures daily, severity-scored against a published scale. Each Monday, if any scored 7 or above that week — deleted data, leaked secrets, broken production — you get one email with the sources. When nothing did, you get nothing.
This database is callable over MCP — query it from inside your agent.