An AI coding agent spent days building security tooling for a feature that doesn’t exist in the product it was working on. The developer behind the project says the agent assumed users could share Spaces with each other. They can’t: a Space belongs to one user only. The case is a useful look at how a wrong premise survives careful review.
How the detour started
The developer was adding better memory management and resumable JavaScript workflows to an application. The work had multi-page specifications and nine rounds of adversarial plan review, run across models from OpenAI, Google and Anthropic. None of them challenged the assumption that Spaces, the project-like containers in the app, could be shared between users.
The agent then wrote security scaffolding and test setups for revoking cross-user access. The feature itself was meant to improve how context gets built from information tied to a Space. Security was a fair concern, but the sharing scenario never existed.
The developer confirmed by hand afterwards that the AI coding agent had built on a premise the product never supported.
Why the tests didn’t catch it
Passing tests proved little. The tests checked behavior under the sharing scenario, but nothing asked whether that scenario belonged in the task. The same unsupported premise shaped both the code and its checks, so the error survived repeated validation.
There’s a cost to any AI coding agent detour, even if the code is later deleted. The effort is spent, and any additions that stay behind are more code to understand, change and maintain.
The limit of “ask when unsure”
The AI coding agent had been told to ask when something was unclear. It never asked whether Spaces could be shared. The developer’s point is that this instruction only works after uncertainty has been recognized. It doesn’t say what should trigger uncertainty. A capability that already sits inside the agent’s picture of the product may not look like an assumption at all.
Adding “Spaces cannot be shared” to the work item might have prevented this one case. It wouldn’t reveal which other missing capabilities to list next time.
Human engineers also misread requirements. The difference is that a team builds shared background over time, through implementation, debugging, reviews and conversations. A work item is a change request set against that background, not a full onboarding.
Making agent judgment inspectable
The developer doesn’t want to make plans exhaustive. A reviewed plan still leaves room in how it gets carried out, and using judgment inside that room is part of why work gets delegated. The aim is to make that judgment visible.
Terminals, tool traces, test results and Git diffs already show parts of what an agent did. They don’t explain how a requirement turned into a specific change. The proposal links each piece of work to the product interpretation behind it. In this incident the chain ran like this:
- Context optimization
- An assumed sharing and revocation model
- Extra security scaffolding
- Tests for that scenario
The unit being tracked is an activity: a coherent piece of work with an identifiable purpose, such as implementing safeguards for cross-user sharing. A single file read or test run is an event inside it. Token use, time, tool calls and retries would attach to activities, based on execution records rather than a model’s own estimate of its effort.
The developer isn’t asking for access to a model’s private reasoning, only for inspectable engineering commitments: a claimed product rule, its source, the code that depends on it, and the evidence offered. Those still have to be checked against the real product, since a persuasive after-the-fact explanation can rationalize a bad decision.
Five ways knowledge can fail
A trace wouldn’t necessarily have prevented the detour, and it doesn’t say which failure caused it. The developer lists five lookalike problems:
- The product rule is missing from retained knowledge.
- The rule exists but wasn’t retrieved.
- The rule was supplied but not applied.
- The rule used to be correct and is now stale.
- The agent restated the rule correctly, then made a choice that contradicted it.
Each needs a different fix. Stuffing another paragraph into every prompt might patch the first and hide the others, and better retrieval can’t repair a wrong rule.
What a fix could look like
The loop the developer wants runs from observation to diagnosis, then to a verified correction in knowledge, retrieval or workflow, then to evaluation on later tasks. A knowledge graph could help, with a rule such as “Spaces are not shareable between users” carrying a source, a scope and a validity boundary. Absent sharing code alone wouldn’t show whether sharing was banned by design or simply not built yet.
One safeguard matters most: the agent’s own account must never turn into product knowledge automatically. Otherwise the false sharing premise could be remembered and retrieved more efficiently next time. Product evidence and human review decide what counts as established.
The developer’s goal is for these checks to run inside the agent’s normal workflow, so a person reviews consequential choices instead of reconstructing them.
Source: blog.fruhinsholz.com