STUPID-2026-0074
Copilot CLI destroyed its own 233MB session log trying to "back it up" with a hardlink instead of a copy
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.
Classification
- Agent
- Github Copilot
- Failure mode
- Destructive Action
- Root cause
- Tool Misuse
- Domain
- Data
- Source
- Github Issue