Hi peeps, how do you prevent stale test data/code from misleading Claude Code or other coding agents?
- 发布
- 09/04 13:53
- 首次发现
- 09/04 18:00
- 类型
- 开发者社区 · RSS
一位开发者在reddit.com上指出,代码仓库中过时或陈旧的信息,例如旧的测试夹具、模拟数据、常量、注释或反映旧行为的测试,可能会误导像Claude Code这样的编码代理。这个问题令人沮丧,因为它浪费了token并导致与代理的持续争论。该开发者正在寻求关于如何防止这一问题的建议、实证或研究。
One problem I’ve noticed is that there can be stale or outdated information inside the repository itself — for example old test fixtures, mock data, constants, comments, or tests that still reflect previous behaviour.
This infuriates me as it wastes token and makes me argue with my agent non stop.
Has anyone dealt with this problem in a large codebase? How do you make coding agents distinguish between: current production behaviour authoritative specs/contracts old tests or fixtures legacy/dead codeoutdated comments/documentation?
Any advice, empircally or studies is welcomed :) and apologies if this has been discussed before