You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d77541f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(server): report session exits when a provider instance is torn down
Removing or replacing a provider instance (any `providerInstances` settings
edit) closed the instance scope while threads were mid-turn, and the
orchestrator never heard about it: those threads stayed "running" forever.
- CodexSessionRuntime.close emitted `session/closed` and then immediately
`Queue.shutdown` the events queue, which clears buffered messages, so the
exit was dropped before the adapter forwarder took it. End the queue
instead so the consumer drains it.
- CodexAdapter.stopSessionInternal closed the session scope (interrupting
the forwarder) right after `close`; wait for the forwarder to drain first.
Both adapters now end their runtime event queue on release instead of
shutting it down, so already-emitted exits stay readable.
- ProviderInstanceRegistry.reconcile now calls `adapter.stopAll()` before
closing a removed/replaced instance's scope. Adapter finalizers stop
sessions silently on purpose (server shutdown keeps threads resumable);
a settings edit is not a shutdown.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
0 commit comments