👋 Hey Copilot CLI team — filing a high-severity bug. John (Agency team) routed me here from aka.ms/copilotcli/support since I don't have access to the form.
What happened
Coding session in copilot (via agency copilot wrapper). At ~75% context, the agent compacted, re-read the summary, and resumed PLANNING instead of executing. Repeated 217 times before I killed it. Zero file edits. Hours of compute and quota gone.
Root cause (hypothesis)
Compaction preserves the plan as the most salient signal post-compact. The agent treats "we have a plan" as a fresh prompt to plan against, instead of as decided work to execute. Structural, not prompt-specific.
Repro
copilot (or agency copilot)
- Moderately complex prompt (feature across files A/B/C with tests)
- No AGENTS.md guardrails
- Let session run past auto-compact threshold
- Post-compact: agent plans again instead of editing files. Loops.
Appears deterministic.
Impact
- Hundreds of model calls, zero output
- Full session lost, manual recovery required
- Undermines trust in long-running autonomous tasks
- Likely under-reported (users blame themselves before the tool)
Proposed fixes (priority order)
- Compaction summarizer: label plans as "DECIDED — do not re-plan"
- Default post-compact rule: "Resume from next file edit, do not re-validate the plan" (ref: https://github.com/Dicklesworthstone/post_compact_reminder)
- Add
--mode execute session flag biased against planning preambles
- Loop detector: N consecutive turns with zero file edits → halt (default N=3)
- Better /compact defaults: drop planning history
- Telemetry signal for "planning loop suspected"
Workarounds I'm using
AGENTS.md "no re-plan after compact" rule + post-compact reminder hook + manual /compact at ~60% + HANDOFF.md as ground-truth state file. These work but shouldn't be required of every user.
Environment
- Copilot CLI: 1.0.41
- Node: v22.22.2
- OS: Windows
Happy to share session logs and join a triage call.
— Akhi Shukla, Senior PM, IC3 / UED, Prague
👋 Hey Copilot CLI team — filing a high-severity bug. John (Agency team) routed me here from aka.ms/copilotcli/support since I don't have access to the form.
What happened
Coding session in
copilot(via agency copilot wrapper). At ~75% context, the agent compacted, re-read the summary, and resumed PLANNING instead of executing. Repeated 217 times before I killed it. Zero file edits. Hours of compute and quota gone.Root cause (hypothesis)
Compaction preserves the plan as the most salient signal post-compact. The agent treats "we have a plan" as a fresh prompt to plan against, instead of as decided work to execute. Structural, not prompt-specific.
Repro
copilot(oragency copilot)Appears deterministic.
Impact
Proposed fixes (priority order)
--mode executesession flag biased against planning preamblesWorkarounds I'm using
AGENTS.md "no re-plan after compact" rule + post-compact reminder hook + manual /compact at ~60% + HANDOFF.md as ground-truth state file. These work but shouldn't be required of every user.
Environment
Happy to share session logs and join a triage call.
— Akhi Shukla, Senior PM, IC3 / UED, Prague