{"schema_version":"newruntime-agent-readable-v0.2","type":"post","stable_id":"post:claude-code-context-cruft-audit","slug":"claude-code-context-cruft-audit","title":"Audit Claude Code Context Before You Rewrite the Prompt","description":"The safest response to Claude Code prompt bloat is an evidence-led context audit: inspect loaded memory, skills, hooks, MCP tools, and setting precedence before deleting safeguards.","retrieval_nugget":"The safest response to Claude Code prompt bloat is an evidence-led context audit: inspect loaded memory, skills, hooks, MCP tools, and setting precedence before deleting safeguards. A provocative practitioner recipe recommends proxying Claude Code traffic, inspecting everything sent to the model, and removing accumulated prompt bloat through settings.","status":"published","published_at":"2026-07-24","updated_at":"2026-07-24","record_date":"2026-07-24","date_kind":"published_at","topics":["claude-code","context-engineering","agent-configuration"],"source_urls":["https://x.com/mattpocockuk/status/2074464823232888987","https://code.claude.com/docs/en/debug-your-config","https://code.claude.com/docs/en/context-window","https://code.claude.com/docs/en/settings"],"visuals":[{"id":"claude-context-audit-sequence","kind":"editorial-diagram","role":"hero","src":"https://newruntime.com/images/posts/claude-context-audit-sequence.webp","alt":"A six-stage context audit inventories loaded layers, inspects their sources, compares a clean configuration, removes one stale item, replays the task, and measures outcomes.","caption":"Prompt cleanup is an evidence-led configuration audit: inspect what loaded, isolate one cause, preserve safeguards, and replay the same work.","credit":"New Runtime synthesis from Claude Code configuration diagnostics","source_url":"https://code.claude.com/docs/en/debug-your-config","generated_with":"gemini-3.1-flash-image","width":1600,"height":900,"legend":[{"label":"Inventory","description":"Use context diagnostics to attribute system tools, memory, skills, hooks, MCP tools, settings, and messages."},{"label":"Inspect","description":"Trace each loaded layer to its scope and source before deciding that it is stale."},{"label":"Compare","description":"Use safe mode or an empty configuration to isolate whether customization causes the problem."},{"label":"Change one thing","description":"Remove one duplicate or stale source while keeping permissions and enforced safety controls."},{"label":"Replay and measure","description":"Rerun the same task and compare context use, latency, tool accuracy, adherence, and test success."}]}],"routes":{"html":"https://newruntime.com/posts/claude-code-context-cruft-audit/","markdown":"https://newruntime.com/posts/claude-code-context-cruft-audit.md","json":"https://newruntime.com/posts/claude-code-context-cruft-audit.json"},"source_format":"markdown","next_reads":[{"type":"topic","path":"/topics/claude-code/","reason":"Explore the claude code topic hub.","url":"https://newruntime.com/topics/claude-code/","title":"Claude Code - New Runtime","media_type":"text/html"},{"type":"topic","path":"/topics/context-engineering/","reason":"Explore the context engineering topic hub.","url":"https://newruntime.com/topics/context-engineering/","title":"Context engineering - New Runtime","media_type":"text/html"},{"type":"related_material","path":"/posts/claude-code-subagents-memory/","reason":"Shares claude code and context engineering.","url":"https://newruntime.com/posts/claude-code-subagents-memory/","title":"Claude Code Subagents Split Memory Instead of Inflating One Session","media_type":"text/html"},{"type":"related_material","path":"/posts/chatgpt-agent-loop-efficiency-stack/","reason":"Shares context engineering.","url":"https://newruntime.com/posts/chatgpt-agent-loop-efficiency-stack/","title":"ChatGPT Cuts Repeated Work Across The Agent Stack","media_type":"text/html"},{"type":"related_material","path":"/posts/contextual-agent-memory-four-layer-system/","reason":"Shares context engineering.","url":"https://newruntime.com/posts/contextual-agent-memory-four-layer-system/","title":"A Vector Store Is Not An Agent Memory System","media_type":"text/html"}]}
