Problem
st2 exposes stable Agent Spec identity, resolved task runtime ID, backend runtime generation, and the desired/observed launch generation tracked in #40. It does not expose a provider-neutral Agent Run ID for one concrete successful launch occurrence.
A backend generation, PID, PTY ID, declaration identity, or provider-native transcript ID is not an Agent Run ID. Collapsing them prevents downstream inventory and telemetry from distinguishing adoption of one run from a later relaunch of the same task.
Logical Agent Session identity is owned by Axe and its harness drivers under #124. st2 may carry that independently supplied opaque correlation value, but it must not allocate it or infer session continuity.
Contract
Add a typed provider-neutral execution envelope:
agentSessionId optional opaque value supplied by the compiled launch contract
agentRunId minted by st2 exactly once for each successful launch occurrence
Recommended durable IDs follow the registered ARN-style resource-name contract:
arn:agent:<stable-scope>:session:<collision-resistant-id>
arn:agent:<stable-scope>:run:<collision-resistant-id>
This issue owns Agent Run allocation and inventory propagation. #124 owns Agent Session allocation, provider-native identity, and session semantics.
Required behavior
- Mint one Agent Run ID for a successful fresh launch or relaunch.
- Do not mint a successful run identity for a launch that fails before the task exists.
- Inspection and reconciliation preserve the same Run ID for the same live run.
- Adoption preserves independently persisted Run and Session evidence or reports each as
unknown; it never fabricates continuity.
- A later successful recreation keeps a supplied Agent Session ID when the compiled contract keeps it and always changes the Agent Run ID.
- Propagate the envelope consistently to PTY/exec runtime metadata, child launch context, and machine-readable task inventory.
- Keep both values descriptive correlation metadata. They grant no lifecycle or authorization capability.
- Never alias either value to backend generation, desired/observed launch generation, task ID, or provider-native transcript identity.
Acceptance
- One running execution keeps the same Run ID across inspection and adoption.
- A successful relaunch changes the Run ID exactly once.
- A failed launch does not publish a successful Run ID.
- A supplied Session ID survives a resume/re-execution while the Run ID changes.
- A new logical session supplied by Axe changes both values.
- Legacy adoption without evidence reports
unknown rather than minting history.
- PTY and exec backends expose equivalent envelope semantics.
- Declaration identity, runtime ID, backend generation, launch generation, Session ID, and Run ID remain pairwise distinguishable in fixtures.
Dependencies and scope
This issue does not define transcript stores, provider flags, fresh/resume selection, or another launch-contract hash.
Problem
st2 exposes stable Agent Spec identity, resolved task runtime ID, backend runtime generation, and the desired/observed launch generation tracked in #40. It does not expose a provider-neutral Agent Run ID for one concrete successful launch occurrence.
A backend generation, PID, PTY ID, declaration identity, or provider-native transcript ID is not an Agent Run ID. Collapsing them prevents downstream inventory and telemetry from distinguishing adoption of one run from a later relaunch of the same task.
Logical Agent Session identity is owned by Axe and its harness drivers under #124. st2 may carry that independently supplied opaque correlation value, but it must not allocate it or infer session continuity.
Contract
Add a typed provider-neutral execution envelope:
Recommended durable IDs follow the registered ARN-style resource-name contract:
This issue owns Agent Run allocation and inventory propagation. #124 owns Agent Session allocation, provider-native identity, and session semantics.
Required behavior
unknown; it never fabricates continuity.Acceptance
unknownrather than minting history.Dependencies and scope
This issue does not define transcript stores, provider flags, fresh/resume selection, or another launch-contract hash.