Delegation

Concept

Delegation

When one agent hands work to another, something has to say the second agent was allowed to act. The tempting design is to let the request carry that claim with it. Aarmos does not, because a claim that exists only for the length of one call cannot be revoked, cannot be audited, and cannot later be shown to be the thing a decision relied upon.

Instead, delegation is a grant: a durable object that exists independently of any request and can be examined long after the work finished.

What a grant answers

A single grant answers, on its own, every question an auditor asks: who delegated, to whom, under which invocation, under which authority, with what bounds, valid from when, expiring when, revoked or not, and descending from which parent grant.

Authority only narrows

A child grant may name only bounds its parent already held. Nothing gains capability by being passed along — if the parent could only read from one service, no descendant can suddenly write to another, however permissive that descendant's own configuration is.

An empty set of bounds means nothing was granted, never "everything". Governance systems fail open when absence is read as permission, so absence is read as refusal.

Chains and cycles

Grants form a chain back to their root, and the chain is checked for structural integrity: whoever issued a child grant must be the holder of its parent. A chain that loops back on itself is refused even when every individual hop looks legitimate and no depth limit was reached.

Admission comes first

Whether an actor may act at all — depth, expiry, revocation, attenuation — is settled before anyone asks whether the specific action is permitted. An expired grant that reached policy evaluation and came back allowed would be a worse outcome than a denial, because the record would read as governed.

Revocation that means something

Pulling a grant also pulls everything descended from it. Because decisions record which grant they relied upon, revocation is not only forward-looking: you can enumerate exactly what was authorised by a grant you have just withdrawn, which is the question that actually gets asked during an incident.

Budgets travel too

Spend ceilings and rate limits follow the chain. A sub-agent burning through calls counts against the authority above it, and trips are receipted.

Denials from these bounds use dedicated error codes — see /docs/errors. For how delegation interacts with layered rules, see effective policy.