Skip to content

docs(agent-identity): record how broker sessions follow Mecatl sessions - #2496

Merged
ChrisJBurns merged 1 commit into
mainfrom
docs/agent-identity-broker-sessions
Oct 23, 2026
Merged

ChrisJBurns merged 1 commit into
mainfrom
docs/agent-identity-broker-sessions

Conversation

@ChrisJBurns

Copy link
Copy Markdown
Contributor

Updates the agent identity design with lasting decisions about broker sessions that were settled while building them, where the design was silent or ambiguous. Interim choices are left out.

Changes

  • Which sessions get a broker session (agent-definitions.md, "Relationships and lifetimes"): main, scheduled, and debug sessions are roots, as is an older session saved without a kind. Subagent, parallel-branch, and team-member sessions belong to the tree of the session that started them. A session with no owner gets no broker session, so its gateway calls fail closed.
  • Fork and clear (the identity-continuity table): the new root instance runs in a new host session, which opens its own broker session. The source keeps its broker session.
  • What closes a broker session (credentials-and-lifecycle.md, "Session end"): deleting the host session closes it. Releasing the session, a client disconnecting, or a replica losing its lease leaves it open, because agents keep working after the user closes their client. The revocation list now says "deleting the session" instead of the ambiguous "closing the session".
  • One open broker session per root host session (step (3)): a repeated open returns it. An open with another owner fails with session_owned, and one with another incarnation fails with ALREADY_EXISTS. The error reasons table now lists the broker, as well as AS-1, as returning session_owned.
  • Another workload's session looks like none (step (3), and the registration failures table): it gets the same PERMISSION_DENIED as an unknown session ID, and a lookup by host session finds nothing.
  • Registration reports the owner (step (4) input and check 2, and "Registering instances"): registration reports the instance's host session and owner, and the owner must be the broker session's owner. One session tree has one owner.

For the design author (Juan Antonio Osorio) to review.

Testing

Docs only. matlatl check . --strict is clean on a clean checkout of this branch.

API compatibility

None: design documentation only.

- Which sessions are roots with their own broker session, which belong
  to a root's tree, and that a session with no owner gets none.
- A fork or clear opens its own broker session; the source keeps its
  own.
- Deleting a session closes its broker session; releasing it, a client
  disconnecting, or a lost lease leaves it open.
- One open broker session per root host session: a repeated open
  returns it, another owner fails with session_owned (which the broker
  returns too), and another incarnation with ALREADY_EXISTS.
- Another workload's session looks the same as an unknown one.
- Registration reports the instance's host session and owner, and the
  owner must be the session's owner.

Co-authored-by: Mecatl <[email protected]>
@ChrisJBurns
ChrisJBurns requested a review from jhrozek October 23, 2026 16:06
@ChrisJBurns
ChrisJBurns merged commit 886b7a4 into main Oct 23, 2026
31 checks passed
@ChrisJBurns
ChrisJBurns deleted the docs/agent-identity-broker-sessions branch October 23, 2026 16:26
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 26, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants