| 1 | --- |
| 2 | type: bug |
| 3 | id: bd-353c59d |
| 4 | status: open |
| 5 | title: Agent runs push as the operator, so write protection does not constrain the local fleet |
| 6 | created: 2026-08-07 |
| 7 | source: rejection test on the pilot host, 2026-08-07 |
| 8 | --- |
| 9 | |
| 10 | # Agent runs push as the operator |
| 11 | |
| 12 | An agent run dispatched on the host works in a git worktree beside the operator's own, and pushes |
| 13 | over SSH with the operator's key. The pre-receive hook reads the principal from the key that |
| 14 | authenticated the push, so every push from a locally dispatched run arrives as the operator. The |
| 15 | operator is a declared writer of the protected projects. The invariant therefore admits every write |
| 16 | the local fleet makes, and constrains nothing it does. |
| 17 | |
| 18 | The actors this leaves unconstrained are the ones the approval-gate thinking most wants constrained. |
| 19 | The motivating failure behind [[ida-b7025b5]] |
| 20 | ([ideas/ida-b7025b5-human-decisions-are-signed-acts.md](../ideas/ida-b7025b5-human-decisions-are-signed-acts.md)) |
| 21 | is an approval gate administered by the agent it gates. Write protection is a gate of exactly that |
| 22 | kind: it decides whether a push to a protected ref lands. An agent run holding the operator's key |
| 23 | does not have to defeat it, because the gate cannot tell the run apart from the human whose key it |
| 24 | carries. |
| 25 | |
| 26 | The evidence is a deliberate rejection test. A push from an agent worktree wrote a protected ref and |
| 27 | the hook admitted it. The hook was right to: it was asked whether the operator may write that ref, |
| 28 | and the operator may. The mechanism did what it says. What it says is narrower than the protection |
| 29 | the host appears to have. |
| 30 | |
| 31 | The test-design lesson is separable and worth stating on its own: a rejection test must control the |
| 32 | identity it tests with, or it tests the wrong claim. |
| 33 | |
| 34 | ## Why it is acceptable today |
| 35 | |
| 36 | There is one operator. Agent runs are dispatched only by that operator, on that operator's own |
| 37 | machine, and the protected write that surfaced this was the test's own. Nothing has yet acted under |
| 38 | the operator's principal that the operator did not start, so the grant the runs inherit is currently |
| 39 | no wider in effect than it is in name. |
| 40 | |
| 41 | ## The gate |
| 42 | |
| 43 | The invariant needs identities behind it before an agent run acts with meaningful autonomy against a |
| 44 | protected project — a run left to work unattended, a run dispatched by another run, or any run whose |
| 45 | pushes are not watched as they happen. At that point a run must authenticate as its own principal, |
| 46 | so that what the hook decides about it is a decision about the run and not about the human who |
| 47 | started it. |
| 48 | |
| 49 | ## Directions, not decisions |
| 50 | |
| 51 | These are existing threads, and this bug is what pulls them together. |
| 52 | |
| 53 | - **Registry entries for the machines and runs that push.** [[dcr-b87f6e8]] |
| 54 | ([decisions/dcr-b87f6e8-identity-is-a-governed-registry.md](../decisions/dcr-b87f6e8-identity-is-a-governed-registry.md)) |
| 55 | already makes a principal a declared entry holding its own keys, its grants, and an expiry where |
| 56 | the kind warrants one. A run that is its own principal is an entry of that shape, and expiry is |
| 57 | what keeps the registry from accreting one per run forever. |
| 58 | - **Per-run delegation.** [[ida-a8243d2]] |
| 59 | ([ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md](../ideas/ida-a8243d2-agent-runs-act-under-delegated-authority.md)) |
| 60 | gives a run a bundle of permissions delegated from whoever initiated it, narrowable at every hop. |
| 61 | That is the shape the writer grant wants: a run pushes with authority derived from the operator's, |
| 62 | attenuated to what the run was dispatched to do. |
| 63 | - **Not crediting the machine at all.** [[bd-8a591dc]] |
| 64 | ([bd-8a591dc-machine-credentials-never-expire.md](./bd-8a591dc-machine-credentials-never-expire.md)) |
| 65 | observes that a machine the integrator fetches from needs to be reachable, not authorized to push. |
| 66 | A run that never holds a pushing credential cannot inherit the operator's, and the question of |
| 67 | which principal its push carries stops arising. |