Pattern-interrupt & context re-grounding for Claude Code — stop the wrong path, audit the assumptions, restart clean.
When the agent commits to a wrong path and keeps compounding it — defending the
bad approach turn after turn — bonk halts it, audits what it's actually
assuming, and (when the context is too far gone) restarts from a clean, verified
problem statement re-derived by a fresh-context subagent.
The real problem usually isn't the model's reasoning — it's the polluted
context it keeps conditioning on (stale assumptions, dead ends, its own prior
commitments). bonk is about re-grounding that context, not scolding the model.
In Claude Code:
/plugin marketplace add fr1j0/bonk
/plugin install bonk@bonk
Then use /bonk:it and /bonk:resume.
bonk runs after you've stopped the agent (a slash command can't interrupt a
running turn — only Esc can):
Esc # stop the wrong-path execution immediately
(Esc Esc # optional: rewind to undo bad edits
or /rewind)
/bonk:it [hint] # re-ground on the clean state
Note:
/rewindonly undoes edits made by Claude's edit tools — not bash side-effects (rm/mv/generated files), which need git.
Note: run
/bonk:itand/bonk:resumein the same project. The clean brief is saved under the repo root's.bonk/(resolved viagit, so any subdirectory of the repo works), but resuming from a different repo — or outside any repo, where it anchors to the working directory — won't find it.
/bonk:it [optional hint]— emits a Drift check report: what triggered it, a plain-language verdict (start over or keep going), the load-bearing assumptions ranked by confidence, and the context it's working from. On start over, a fresh-context subagent re-derives the approach blind to the bad turns; you approve, and it persists a clean brief./bonk:resume— after you/clear, rehydrates the clean brief into the fresh context and continues from the corrected approach.
Want to see the report format? Run
bash plugins/bonk/scripts/preview-report.shfor a rendered sample.
v0.5.0 shipped. See the design spec for the full design and the plan for how it was built; the report-format redesign and the visual redesign (banners, monochrome icons, grid) cover the current Drift-check report.
