Skip to content

Explain session creation failures during server shutdown - #52721

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f167144c0ddc77872afdf3daac8bb1c89f3425b4
Oct 9, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f167144c0ddc77872afdf3daac8bb1c89f3425b4

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Explain session creation failures during server shutdown

Why

Graceful shutdown rejects new sessions with an invalid-request error. Give clients a structured shutdown reason and show command center users why session creation is paused.

What changed

  • Add data: {"reason":"serverShuttingDown"} to app-server shutdown admission errors while retaining JSON-RPC code -32600.
  • Show a dedicated shutdown message explaining the wait for active turns and automatic reconnection for non-embedded servers. Recognize older servers by their exact draining message only when error data is absent, and preserve retained-worktree cleanup guidance.
  • Keep the command center reconnect presentation when a shutdown error covers the initial overview and no conversation is open.

Testing

Extend admission and WebSocket shutdown assertions, add embedded and daemon shutdown message snapshots, and cover reconnection with a shutdown error over the initial command center.

## Why

Graceful shutdown rejects new sessions with an invalid-request error. Give clients a structured shutdown reason and show command center users why session creation is paused.

## What changed

- Add `data: {"reason":"serverShuttingDown"}` to app-server shutdown admission errors while retaining JSON-RPC code `-32600`.
- Show a dedicated shutdown message explaining the wait for active turns and automatic reconnection for non-embedded servers. Recognize older servers by their exact draining message only when error data is absent, and preserve retained-worktree cleanup guidance.
- Keep the command center reconnect presentation when a shutdown error covers the initial overview and no conversation is open.

## Testing

Extend admission and WebSocket shutdown assertions, add embedded and daemon shutdown message snapshots, and cover reconnection with a shutdown error over the initial command center.

GitOrigin-RevId: f167144c0ddc77872afdf3daac8bb1c89f3425b4
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f167144c0ddc77872afdf3daac8bb1c89f3425b4 branch from 0b7497d to 07757f4 Compare October 9, 2026 23:16
@copyberry
copyberry Bot merged commit 07757f4 into main Oct 9, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f167144c0ddc77872afdf3daac8bb1c89f3425b4 branch October 9, 2026 23:17
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
πŸ“ Code Review πŸ”„ Running since 2026-10-09T23:16:59.807815Z 0b7497d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with πŸ‘€ while any review is running, comments if it has suggestions, and reacts with πŸ‘ once all reviews finish with no findings.

@github-actions github-actions Bot locked and limited conversation to collaborators Oct 9, 2026

This branch was successfully deployed

1 active deployment
issue-triage β€” 07757f44 Deployed Oct 9, 2026 by hc37tw-dotcom via Identify potential duplicates (all issues) #53887
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants