What happens when a coding agent forgets why a change was rejected?
说明与用途
缺乏上下文的编码代理会重复已被拒绝的方案。添加简单的上下文文件可让代理避免错误并加快工作速度。
问题
Coding agents lack knowledge of past rejected changes, leading them to revisit dead‑end solutions.
结果
Agents with context avoided the rejected simplification in all runs and were roughly 2.4× faster; control agents repeated the dead‑end in 70% of runs.
工作流
- 1. Create two identical repos: one without context, one with a context/retries.md explaining the rejection.
- 2. Install Keep the Why and run Claude Code sessions with SessionStart hook.
- 3. Start ten fresh sessions per repo, prompt the agent to simplify the retry wrapper.
- 4. Record transcripts, diffs, and performance metrics.
- 5. Compare control vs treatment results.
证据
All ten sessions found the rationale. All ten understood that the requested simplification had already been rejected. None of them put the bad idea back on the table.
The median wall time dropped from 43 seconds in the control group to 18 seconds with the recorded rationale.
- 记录日期: 2026-09-15T04:31:41.334Z