Skip to content

Emit Environment pending and ready events - #870

Merged
SaladDay merged 1 commit into
mainfrom
emit-environment-pending-and-ready-events
Oct 25, 2026
Merged

SaladDay merged 1 commit into
mainfrom
emit-environment-pending-and-ready-events

Conversation

@SaladDay

@SaladDay SaladDay commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

Hosted Sessions now stream the pinned agent.session.environment.pending and agent.session.environment.ready events, which the ledger listed as a known gap.

  • An openai_hosted Environment journals pending in the transaction that starts its initialization and ready in the one that completes it. Each transition is a conditional update, so retries, a preparation-cache hit and a Core restart never repeat an event. self_hosted Environments emit neither. Connected, disconnected and failed are unchanged.
  • The ledger moves the remaining differences to their sections: ready is not re-emitted before each later Turn as one official Session did, hosted Environments still emit connected/disconnected, and when the official service emits pending is unverified.

Checks: go test ./internal/sessions, go vet ./... (services/core), go test ./tests/integration/ ./internal/api/ -run 'Initialization|EnvironmentInputActivity|CreationStream|HostedEnvironment|Event|Stream|Hosted|Environment|Turn' against PostgreSQL.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@SaladDay
SaladDay merged commit e8e658e into main Oct 25, 2026
19 checks passed
@SaladDay
SaladDay deleted the emit-environment-pending-and-ready-events branch October 25, 2026 05:58
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.

1 participant