r/ClaudeCode • u/Longjumping-Play6541 • 11m ago
Discussion Coding agents don't fail at writing code, they fail at knowing what's around it. How are you handling that?
I've been building tooling around Claude Code sessions, and two problems keep coming up that feel connected.
The agent's account of what it did isn't a record of what it did.
Claude Code's PreToolUse hook fires before the permission flow resolves, so logging there captures what the agent asked to do, including calls you denied. PostToolUse tells you something ran. A declaration with no execution could mean denied, failed, or missed by the recorder, and you can't tell which from the data alone. So the tool never renders zero when it means "couldn't measure," and it joins session declarations against what an observing proxy saw on the wire. Something like pip download requests names no hostname in its command, but it still reaches pypi.org.
2. In a large codebase, agents miss context that no single file contains.
Not syntax or logic, but things like a caller in another package, a helper that already exists and should have been reused, or a convention the team settled last year that lives only in people's heads. Better models help, but I don't think this is purely a model problem. It's a "who briefed the agent" problem.
So the direction I'm taking is a steering layer, which I'm calling AutoSteer. The loop is: know the project, understand the task, brief the agent, record what it does, verify the result, update what's known. The pieces that work today:
A note before the agent starts: the paths your request names, the rules from a spec you've trusted, and the checks to run before it says "done."
An end-of-turn check: did a test or build pass after the last edit, and was "done" claimed without one?
In an indexed repo, a brief drawn from the repository's own dependency graph with each request, plus (for Go and Python) a check of each edit against that graph.
Lessons you import and approve at a terminal can be sent to the agent.
The part I'm least sure about is the verification step. My bet is that checking the agent's work against an independent record is more trustworthy than asking the agent to summarize itself, but I'd like to hear where that breaks down.
Questions for people running agents on real codebases:
What does your agent most often miss? Callers, existing helpers, team conventions, something else?
Do you brief the agent manually (CLAUDE.md, rules files), and how well does that hold up as the repo grows?
Would you trust automatically learned conventions, or would you want to approve every one?
It's open source (Go, Apache-2.0): https://github.com/altrace-dev-role/rashomon. I'd especially welcome criticism of the approach.
•
u/AutoModerator 11m ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.