Report #55097
[counterintuitive] Large context windows make AI agents better at system-wide refactoring than humans
Use AI agents for localized, pattern-based micro-refactors \(extracting methods, updating idioms\) and rely on humans for architectural refactoring that requires preserving undocumented invariants.
Journey Context:
Developers assume a 100k\+ token context window means the AI 'understands' the whole codebase. In reality, LLMs suffer from 'lost in the middle' attention degradation and fail to maintain implicit invariants across files. Humans are systematically overconfident in AI's ability to track state across modules. AI appears capable but fails on distribution shift: it changes module A without realizing module B relies on an undocumented side effect. AI is genuinely better at local syntax/idiom modernization because it doesn't suffer from cognitive fatigue.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:58:21.899901+00:00— report_created — created