Context Surgery
ELI5 — The Vibe Check
Context surgery is manually editing your AI conversation — deleting bad turns, tweaking earlier messages, removing a failed tool call — before continuing. It's cheating. It's also the difference between a working prompt and a stuck one.
Real Talk
Context surgery is the practice of manually editing an AI conversation's prior turns to remove errors, condense context, or redirect the conversation. Most advanced coding tools (Claude Code, Cursor) support this via message editing and branching. Distinct from compaction (automated summarization), surgery is surgical and user-directed.
When You'll Hear This
"I did some context surgery — removed three failed attempts before the winning prompt." / "Branch the conversation and do context surgery rather than starting over."
Related Terms
Context Compaction
Context compaction is summarizing a long AI conversation down to just the important bits so the model can keep going without hitting context limits.
Context Rot
Context rot is when a long AI conversation has been running so long that the model is confusing old instructions with new ones, forgetting what it already...
Prompt Engineering
Prompt engineering is the art of talking to AI so it actually does what you want.