Document one option change at a time per agent

The agent manager runs option, model, thinking and mode changes in the agent's
lifecycle lane; providers do no sequencing. The hook deadlock warning now covers
agent.create.before and option writes.
This commit is contained in:
Mohamed Boudra
2026-11-08 12:59:25 +01:00
parent 99f270962b
commit c6f2a782bb
3 changed files with 17 additions and 10 deletions
+4 -3
View File
@@ -474,9 +474,10 @@ path shape: a plugin can place a worktree several directories below the default
Emit from the operation owner, not a client subscription. Provider history replay must not trigger
live hooks. Notifications must not be awaited inside agent mutations: a handler can send a prompt
or answer a permission through its own daemon session. Awaiting it there deadlocks that command.
The same holds for a hook that runs inside an agent's lifecycle lane: an `agent.open.before` hook
that awaits a write to the agent being opened (`setMetadata`, `setLabels`) waits on the open, which
waits on the hook. The hooks reference tells plugin authors to start such a write without awaiting it.
The same holds for a hook that runs inside an agent's lifecycle lane: an `agent.open.before` or
`agent.create.before` hook that awaits a write to the agent being opened (`setMetadata`, `setLabels`,
an option, model, thinking or mode change) waits on the open, which waits on the hook. The hooks
reference tells plugin authors to start such a write without awaiting it.
## Contribute a provider