- agent context decays over a long session and skills or instructions become less reliable
- CI is way too late for such feedback and soft static analysis warnings are very easy to ignore
- none of the tools I found gave me exactly what I wanted at a speed that allows it to run on every agent turn.
And then I finally found the answer to a question that had been bugging me - why are coding agents so bad at detecting code smells? Because they don't have a nose.
So I built them one - sensez is my attempt at fixing all 3. It's an open-source static-analysis toolkit for Python and JS/TS and its noze module looks for duplication, dead code, cycles and code smells. The idea is for the agent to run it while the context is still fresh, fix what it introduced, then continue. It runs locally and the scans are generally well below a second on the repos I've tested - between 160 and 270 ms. Apart from using it daily for the past 2 months, I also ran an A/B eval across ~90 tasks using deepseek-v4-flash. In the final diffs, control runs contained 129 new structural clones and 14 new code smells (as reported by sensez), compared with 0 new clones and 2 new code smells with sensez in the loop, at ~9% more token usage. The sensez runs still produced issues along the way — the feedback gave the agent a chance to detect and address them before finishing.
sensez does not replace linters or type-checkers like ruff, ESLint, ty, etc. - it is meant to run alongside them as a separate static signal available to the agent.
I have several improvements planned, including better incremental analysis for very large codebases, a VS Code extension and semantic duplication detection. I'd love feedback, bug reports and ideas, including things like:
* What problems do agents repeatedly introduce in your codebases, regardless of how you've tried to prevent them?
* What static signals would you actually trust enough to put directly into the agent loop?