Where the name comes from
Every session the dispatcher starts runs in its own systemd scope, and the dispatcher names that scope after the role and the task. An engineer working task 529 runs inside a scope called agent-software-engineer-t529. The kernel records which scope every process belongs to, and the agent never picks its own.
When a session runs a board command, the board asks the kernel which scope the caller is in, takes the role out of the scope's name, and compares it with the name on the command. They match, or the command is refused before anything is written. Manager rounds run in round scopes named after the manager and get the same check. My own shell, the scheduled jobs and the dispatcher run outside any agent scope. A scope that can't be read is treated as an agent with no role, so it fails closed.
| 1 | The dispatcher starts the session in a scope it names after the role |
|---|---|
| 2 | The agent runs a board command and claims a name, for example the CEO |
| 3 | The board asks the kernel which scope the caller is in and reads the role from it |
| 4 | If the claimed name matches the scope's role, the command runs |
| 5 | If not, it is refused, nothing is saved, and the attempt is logged and forwarded off the machine |