HomeAboutContents

Automated Engineering: What Happens Beyond the Plan?

OpinionAutomated EngineeringNov 28, 2026Eric Fruhinsholz

A mistaken sharing premise led to a security detour. What would make the purpose and justification of an agent’s work inspectable?

A coherent detour from the wrong premise

A few days into building better memory management and resumable JavaScript workflows for my application, I found an unexpected branch of work. Despite multi-page specifications and nine cycles of adversarial plan review across OpenAI, Google, and Anthropic models, an unchallenged assumption led to a detour: the agent built security scaffolding and test harnesses for cross-user access revocation inside a product where Spaces belong strictly to a single user and cannot be shared.

User isolation was a legitimate requirement. The feature was intended to optimize context creation using information associated with a Space, a project-like container belonging to one user. The mistake was not taking security seriously. It was treating an inter-user sharing model as an established capability without establishing that it existed.

I confirmed the mismatch through manual investigation after the fact. Tests could validate behavior under that sharing scenario without establishing that the scenario belonged in the task. The same unsupported premise could shape both the implementation and its checks, leaving the misunderstanding untouched through repeated validation.

The unnecessary work had already consumed effort, whether or not its code survived. A working feature can also conceal a costly detour: if the additions remain, they leave more code to understand, modify, and maintain.

The judgment left beyond the plan

The agent was supposed to ask when something was unclear. It did not ask whether Spaces could actually be shared.

That is the limit of “when in doubt, ask.” The instruction describes what to do after uncertainty has been recognized. It does not establish what should provoke uncertainty. A capability that already belongs to the agent’s representation of the product may not appear to it as an assumption at all.

I could have added “Spaces cannot be shared” to the work item. That might have prevented this incident. It would not tell me which other absent capabilities to enumerate in the next one.

A work item specifies a change against a background of understanding. It is not an onboarding into the whole product. An engineer gradually acquires that background through implementation, debugging, review, conversations, and exposure to company and business context. Some of it becomes common understanding without ever being captured in a document. Humans also misunderstand requirements. But teams rely on some continuity between what an engineer learned yesterday and what they decide today.

The agent had access to the repository and documentation, but did not apply the relevant product boundary before organizing work around a conflicting premise.

Even a thoroughly reviewed plan leaves degrees of freedom in its execution. It specifies the intended change and some of the constraints, but it cannot enumerate every interpretation, implementation choice, or supporting activity that will become necessary as the work unfolds. Exercising judgment within those degrees of freedom is part of the value of delegation. I want to make that judgment inspectable, not make the plan exhaustive.

Activities and their justifications

Terminals, tool traces, test results, plans, and Git diffs already reveal parts of an agent’s activity. A trace of actions does not automatically explain how a requirement became a particular change.

I want to connect those artifacts: which product interpretation justified an activity, what implementation followed from it, and what the resulting evidence actually establishes. A passing test suite is part of that evidence; it does not establish that the scenario being tested belonged in the task.

The useful unit of observation is the connection between the interpretation and the work it produced. In this incident:

Context optimization → assumed sharing and revocation → additional security-related scaffolding → tests for that scenario.

By an activity, I mean a coherent piece of work serving an identifiable purpose, not an individual tool call. “Implementing safeguards for cross-user sharing” is an activity. Reading a file or running a test can be an execution event within it. The useful boundary is the purpose I may need to challenge.

I would start with categories grounded in this development work:

Activity Justification to inspect
Product interpretation and investigation Which behavior or constraint needs to be understood, and what establishes it?
Feature implementation Which requested capability does this add?
Supporting changes Why does the feature require this abstraction, refactoring, or dependency?
Security and resilience Which actual threat or failure mode requires this protection now?
Validation and harness work Which expectation does this check, where did it come from, and why does it require this testing machinery?
Correction and rework What caused earlier work to be revisited?

These are provisional categories, not a measured breakdown of the two features. No category inherently means “detour.” Security and tests are not wasted effort because they are not the feature itself. Their justification is the object of review.

The account must connect purpose to execution: what work depended on the sharing premise, which changes and tests it produced, and what effort followed that branch. Token usage, time, tool calls, and retries become attributes of identifiable work, not substitutes for understanding it. Attribution needs to be explicit and grounded in execution records, not a model’s estimate of how hard it worked.

I want to inspect those connections in both directions. From a stated product rule, I can examine the work it justifies. From an actual change or test, I can ask which requirement or constraint supports it. That second direction matters when the agent never recognized its premise as an assumption. Why does context optimization include a sharing and revocation mechanism? A missing justification is a signal to investigate, not proof of an error.

I am not asking for access to a model’s private internal reasoning. I want inspectable engineering commitments: a claimed product rule, its source, the implementation that depends on it, and the evidence offered for that implementation. A persuasive retrospective can rationalize a decision; a source can be irrelevant or stale. Those commitments must be checked against the product and actual artifacts, not treated as a trustworthy inventory of everything the agent assumed.

Understanding this task should help the next one

This incident does not establish that an activity trace would have prevented the detour, or which knowledge failure caused it. Once I can connect a misunderstanding to the work it produced, I can investigate what should change before the next task. A wrong decision does not always mean that more information should be injected. Several failures can look similar:

  • The product rule is missing from retained knowledge.
  • The rule exists but was not retrieved.
  • The rule was supplied but not applied.
  • The rule used to be correct and is now stale.
  • The agent correctly restated the rule but made an implementation choice that contradicted it.

Those failures call for different changes. Adding another paragraph to every prompt might treat the first and obscure the others. Improving retrieval cannot fix a rule that is wrong. A checkpoint may help when information was present but its consequences went unexamined.

The loop I want is observation, diagnosis, a verified correction to knowledge, retrieval, or workflow, then evaluation on later tasks. Its value depends on whether it improves subsequent decisions, not on how much context it accumulates.

A knowledge graph is one possible support for that loop. For this incident, “Spaces are not shareable between users” would need a product source, a scope, and a validity boundary. Relating it to Space ownership and access decisions could help surface it during permissions work. The absence of sharing code alone would not establish whether sharing was prohibited by design or simply not implemented yet.

Observed decisions can guide which relationships deserve attention, but they expose only some gaps. Product changes require old facts to expire or be superseded. Most importantly, the agent’s account must not automatically become product knowledge. Otherwise, the sharing premise could be retained and retrieved more effectively on the next task. Observation produces candidates for correction; product evidence and review determine which candidates are established.

Retaining understanding also creates maintenance and retrieval obligations. On a large application, retrieving and reviewing the full product specification for every task is not a practical baseline. The system needs to bring in the rules and mechanisms relevant to the change, while recognizing that its selection may miss an important constraint. A knowledge graph could support that selection; it would not establish that the retrieved context was sufficient.

The test is whether later tasks benefit: relevant mechanisms are found, unsupported premises become easier to challenge, and superseded rules stop influencing changes. Replaying the original incident successfully would be weak evidence. The correction should help beyond the example that prompted it, at a retrieval and review cost proportionate to the task.

For that to reduce my workload, these checks need to be part of the agent’s normal workflow. The harness should bring consequential choices into review, with their claimed basis and relevant evidence, without relying on me to initiate every check. My role should be to assess those choices, not to reconstruct them or organize the investigation myself.