title: "Anti-Pattern: Context Dumping" last_updated: 2026-03-21 status: proven difficulty: beginner prerequisites:
- Basic experience with any agentic coding tool
Context Dumping
What It Looks Like
You copy-paste an entire 500-line file into your prompt, prefix it with "here's my code," and then ask the agent to fix a bug on line 42. Or you paste full API documentation, config files, and READMEs into the chat "for context."
Why Developers Do This
It feels helpful -- you're giving the agent everything it needs. With chat-based LLMs (non-agentic), you had to paste code in because the model couldn't read files. Old habits carry over.
Why It Fails
Agentic coding tools can read your filesystem directly. When you paste file contents into the prompt, you waste context window tokens on information the agent could fetch on demand. The pasted content also crowds out space the agent needs for reasoning, planning, and generating output. Large paste blocks can even confuse the agent about which version of a file is current.
The Symptoms
- Hitting context limits earlier than expected
- Agent referencing your pasted code instead of the actual file on disk
- Confusion when the pasted version differs from the saved file
- Needing
/compactfar too often
What to Do Instead
Point the agent to files. Let it read what it needs.
# Wrong: pasting the file into the prompt
claude "Here's my auth.ts file: [500 lines of code]. Fix the JWT expiry bug."
# Right: reference the file by path
claude "Fix the JWT expiry bug in src/auth/auth.ts around the token
verification logic"
# Even better: let the agent find it
claude "Users report that JWT tokens expire immediately after login.
Diagnose and fix the issue."
Trust the agent's ability to navigate your codebase. Provide file paths or describe the problem, not raw content.