Skip to content

Sessions run and register the exact definition revision #2548

Open

Description

@ChrisJBurns

Depends on: #2547 (engine provenance), #2526 (the loader the harness runs from), #2529 (engine API order)
Removes shortcut: inline MCP servers in definitions bypass the broker, because the harness does not run definitions from the broker's loader (#2451)
Removes shortcut: registration names the loader's revision, not the exact revision the session runs: named definitions go with no source, the built-in main with no revision (#2545)
Removes shortcut: under an operator harness_context policy, only built-in definitions register, so named sessions and helpers are refused (#2527)
Removes shortcut: the harness resumes every subagent on the default explorer, so a named helper whose credential is gone cannot be resumed (#2555; see the comment below)
Removes shortcut: the harness works out the gateway tools of a named helper, or of a session started with a named definition, from its definition again, rather than reading the ceiling the broker recorded (#2842, #2938)

Problem

The harness discovers the operator's definitions itself, so the agent it runs can differ from the definition the broker checked. Sessions keep only their main definition's name, so a source edit can silently change a running agent. Inline MCP servers bypass the broker.

Implements

Scope

Decide before starting

Done when

  • In broker mode, agents match the loaded records; a digest mismatch is refused, with a test; repository definitions are still discovered.
  • A test shows inline servers dropped with a diagnostic and never connected.
  • New sessions persist and register their exact reference, system/main included; an unrebuildable revision fails closed on restore.
  • Non-broker mode is unchanged.

Earlier notes: #2549 (closed, merged here).

Activity

  1. changed the title [-]Broker mode: the harness uses loader output[/-] [+]Sessions run and register the exact definition revision[/+] on Nov 18, 2026
  2. rdimitrov commented on Nov 20, 2026

    @rdimitrov
    Member

    A gap for this ticket: resuming a subagent should keep its original definition

    The design says "A resumed child session keeps its original definition" (Relationships and lifetimes). Today the engine resumes every subagent on the default explorer engine, whatever it ran first ("a resumed subagent continues on the default explorer engine"). Child sessions also record no definition, so a resume could not recover it.

    With the identity broker on, #2913 (part of #2555) admits a resumed subagent again before it runs:

    • A helper whose credential is still held keeps it, so a resume within a normal run works.
    • A helper whose credential is gone, after a restart or a lost lease, registers as system/explorer, the definition it now runs. The broker refuses that for an agent it recorded with another definition (check 7), so the resume fails.

    That refusal is correct for what runs today. The fix belongs here, since it needs sessions to record exactly which definition they run:

    • Record the definition, and its revision, on child sessions.
    • Resume a subagent on that definition.
    • Decide what happens when the definition was removed or changed since, and how read-write resume (today the writable explorer) fits.

    Changing the resume engine is an engine behavior change for every deployment, not only broker mode, so it needs the engine compatibility classification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions