Skip to content

Define renderer-owned harness sessions and the generic st2 lifecycle boundary #124

Description

@schickling-assistant

Outcome

This issue is the umbrella for renderer-owned harness session identity and the generic st2 lifecycle boundary.

The ownership decision is:

  • Axe allocates the stable logical Agent Session ID.
  • Harness-specific drivers understand Codex, Claude Code, native session IDs, transcript layouts, compatibility, and provider flags.
  • Axe/the renderer compiles that knowledge into one complete ordinary Agent Spec launch contract: exact argv, environment, rendered files, and optional opaque correlation metadata.
  • Core Agent Spec and the st2 up daemon remain harness-agnostic. They do not parse provider transcripts, synthesize provider flags, or choose between provider-specific fresh/resume behavior.
  • st2 owns generic task observation, launch-generation comparison, fencing, recreation, receipts, and reconciliation.

The normalized catalog is therefore a compiled boundary, not the place where Codex or Claude lifecycle wisdom is implemented.

Compilation boundary

Harness-aware authoring may use driver-specific input such as the following non-normative shape:

claude {
  session {
    id "arn:agent:<scope>:session:<id>"
    native-id "<provider-native-id>"
    restore "resume-and-rewake"
  }
}

That input is consumed before core st2 reconciliation. The renderer emits one complete launch contract, conceptually:

agent "cos" {
  argv "axe" "agent" "launch" "<fully rendered axes>"
}

The exact authoring syntax remains open. The invariant is that the daemon sees a complete command rather than partially interpreting harness session policy.

Identity boundaries

The system must distinguish:

  1. stable Agent Spec identity;
  2. Axe-allocated logical Agent Session ID;
  3. provider-native session ID resolved by a harness driver;
  4. st2 Agent Run ID for one successful launch occurrence;
  5. backend runtime incarnation/generation;
  6. desired and observed launch-contract generations; and
  7. the host currently authorized to write a portable session store.

None may be silently inferred from a PTY ID, PID, cwd-based last-session lookup, display label, or another identity in this list.

Responsibilities

Axe and harness drivers

  • allocate the logical Agent Session ID;
  • resolve or create the exact provider-native session;
  • distinguish passive restore, resume-and-rewake, fresh start, and any provider-specific fallback;
  • validate transcript/store compatibility and uniqueness;
  • render the complete command, environment, and required files; and
  • expose enough observed lineage for a launch receipt to prove which native session was selected.

st2

Fabric or another store transport

Portable session storage and cross-host movement require a separate single-writer ownership protocol. File convergence alone does not authorize a second writer. A move must fence the source, prove a resumable store generation, converge it, transfer authority, and only then launch the compiled destination contract.

Remaining design work

  • Ratify Define Axe harness drivers and extract all harness-specific behavior from st2 core #162's Axe driver interface and renderer-owned harness blocks without moving provider semantics into st2 core.
  • Ratify logical Agent Session ID format, scope, persistence, and allocation failure behavior.
  • Define how opaque logical and native correlation evidence is supplied to inventory without teaching st2 provider semantics.
  • Define provider-specific receipts for passive restore, resume-and-rewake, fresh start, and explicit fallback.
  • Define the portable store bundle, compatibility version, sensitivity/retention policy, and size limits.
  • Define the cross-host single-writer transfer protocol and its failure recovery.
  • Add paired Codex and Claude controls for exact resume, fresh creation, ambiguity refusal, missing/incompatible state, and concurrent first launch.

Child work

PR #157 explored core start/resume method selection. Its evidence remains useful, but that API is superseded by this renderer-first ownership boundary.

Activity

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

Metadata

Metadata

Assignees

Labels

area:agent-specAgent Spec format, parsing, and the agent-spec crate · Set: manualarea:driverHarness drivers: launch, MCP, app-server, native delivery · Set: manualarea:identityAgent, session, run, and launch-generation identity · Set: manualharness:neutralHarness-neutral core that must not encode provider specifics · Set: manualorigin:agentFiled or primarily produced by an AI agent · Set: manualstate:needs-researchNeeds research / investigation before scope or approach is clear · Set: manualstate:open-design-questionUnresolved design choice requiring explicit alignment before implementation · Set: manualtype:epicLarge tracking issue with child tasks · Set: manual

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions