🌐 日本語
Structural Problems × Claude Code Countermeasures Map (Detailed)
NOTE
Correspondence between the eight structural problems and countermeasures in Claude Code.
The countermeasure column is a set of representative examples. Other tools do not necessarily ship features at the same granularity.
Countermeasure Map
Context Rot (Quality Degradation with More Tokens)
| Countermeasure | Category | Effect |
|---|---|---|
/compact | Session Management | Compress conversation history to reduce token count |
/clear | Session Management | Reset session to start with fresh context |
| CLAUDE.md 200-line limit | Resident Context | Minimize fixed cost |
.claude/rules/ | Conditional Context | Prevent unnecessary rule injection |
| Skills | On-Demand | Deploy only when needed |
| Agents | On-Demand | Avoid root cause with independent context |
| MCP Tool Search | Tool Definition | Lazy-load tool definitions |
| Code Intelligence (LSP) | Code World | Retrieve symbols precisely without loading whole files |
| Agent Teams | Multi-Session | Parallel decomposition — no single session ever grows large |
Lost in the Middle (Information Loss in Middle of Context)
| Countermeasure | Category | Effect |
|---|---|---|
/compact (50% threshold) | Session Management | Compress before U-curve collapse |
.claude/rules/ | Conditional Context | Inject only necessary rules at high-attention positions |
| Agents | On-Demand | Avoid middle problem with fresh context |
| Skills | On-Demand | Inject near end for high-attention placement |
| Agent Teams | Multi-Session | Each session's history stays short; no "middle" forms |
Priority Saturation (Reduced Compliance with Too Many Instructions)
| Countermeasure | Category | Effect |
|---|---|---|
| CLAUDE.md 200-line limit | Resident Context | Keep simultaneous active instructions below degradation threshold |
.claude/rules/ | Conditional Context | Distribute instructions conditionally |
| Skills | On-Demand | Load task-specific instructions only when needed |
| Hooks | Runtime | Exclude mechanical rules from context budget |
| Agent Teams | Multi-Session | Split responsibilities across sessions; each carries fewer instructions |
Hallucination (Structurally Unavoidable)
| Countermeasure | Category | Effect |
|---|---|---|
| Hooks (test execution) | Runtime | Compilers and test runners don't hallucinate |
| Cross-Model QA (Agents) | On-Demand | Verification across different models |
| MCP | Tool Definition | Reference external trusted sources |
| Code Intelligence (LSP) | Code World | Symbol-level grounding before code is committed |
| CLAUDE.md | Resident Context | Make constraints and version info explicit |
Sycophancy (Prioritizing Agreement Over Accuracy)
| Countermeasure | Category | Effect |
|---|---|---|
| Agents (Cross-Model QA) | On-Demand | Different models don't share the same conformity bias |
| Hooks | Runtime | Mechanical verification without conformity bias |
| CLAUDE.md (contradiction instruction) | Resident Context | Explicit instruction to "find problems" |
| Test Code | External Validation | Objective facts as a safeguard |
Knowledge Boundary (Inability to Say "I Don't Know")
| Countermeasure | Category | Effect |
|---|---|---|
| MCP (external knowledge reference) | Tool Definition | Extend knowledge boundary externally |
| Code Intelligence (LSP) | Code World | Resolve project-private and post-cutoff symbols via language server |
| CLAUDE.md (explicit version) | Resident Context | Specify "which point in time's knowledge to use" |
| Agents (knowledge separation) | On-Demand | Narrow knowledge domain to reduce boundary crossing probability |
| Test Code | External Validation | Detect outputs that exceed knowledge boundary |
Prompt Sensitivity (Results Vary by Expression)
| Countermeasure | Category | Effect |
|---|---|---|
| CLAUDE.md writing style | Resident Context | Specific and imperative writing removes ambiguity |
| Skills description | On-Demand | Diverse expressions improve invocation accuracy |
.claude/rules/ | Conditional Context | Reduced simultaneous instructions prevent sensitivity degradation |
| Hooks and tests | Runtime | Verification independent of prompt expression |
| Plugins / Marketplaces | Distribution | Distribute verified prompts so each engineer does not retry from scratch |
Instruction Decay (Rule Forgetting in Long Conversations)
| Countermeasure | Category | Effect |
|---|---|---|
/compact | Session Management | Preventive compression before 50% usage |
/clear | Session Management | Reset degradation by splitting sessions |
| Hooks | Runtime | Force execution independent of context |
| Agents | On-Demand | Execute task with fresh context |
| Git commits | External Persistence | Easy rollback of degraded output |
| Plugins / Marketplaces | Distribution | Enforce organizational conventions so they survive turnover and onboarding |
Full Map (Visual)
Visualize the above countermeasure map from the perspective of countermeasure categories. Each diagram shows "which problems this countermeasure addresses."
Session Management — /compact /clear
Resident Context — CLAUDE.md (200-line limit)
Conditional Context — .claude/rules/
On-Demand Context — Skills & Agents
Runtime — Hooks
Tool Definition — MCP & Tool Search
Integrated Full Map — Problem Chain × Countermeasure Placement
The complete picture of how the 8 structural problems interconnect and where Claude Code features intervene.
How to Read:
| Element | Shape | Meaning |
|---|---|---|
| ■ Rectangle nodes (color-coded) | Structural problems (color indicates type) | |
| ⬮ Rounded nodes (blue) | Claude Code countermeasures | |
| Solid → | Problem causes or amplifies another problem | |
| Dotted -.-> | Countermeasure intervenes at this point |
NOTE
The countermeasures listed here assume the LLM is doing the judging. For what remains once judgment itself moves into code, see Failures That Remain in the Narration Layer.
Countermeasure Map (Overview) also available