Skip to content

fix(studio): recover built-in Codex sessions after idle timeouts - #911

Merged
yaozheng-fang merged 2 commits into
volcengine:mainfrom
zakahan:fix/studio-codex-websocket-reconnect
Aug 17, 2026
Merged

fix(studio): recover built-in Codex sessions after idle timeouts#911
yaozheng-fang merged 2 commits into
volcengine:mainfrom
zakahan:fix/studio-codex-websocket-reconnect

Conversation

@zakahan

@zakahan zakahan commented Aug 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • rotate aging Codex app-server WebSocket transports before the gateway 30-minute lifetime and resume the active thread
  • validate cached Codex transports when users re-enter a Sandbox session
  • route Sandbox same-origin HTTP and SSE requests through the shared Studio authentication recovery flow
  • retry the original request after OAuth reauthentication instead of parsing a redirected login page as an empty SSE response
  • add regression coverage for transport reconnection, OAuth redirects, and confirmed 401 responses

Testing

  • cd frontend && npm test — 614 tests passed
  • cd frontend && npm run build
  • uv run --group dev pytest -q tests/cli/test_codex_app_server.py tests/cli/test_frontend_sandbox.py — 61 tests passed
  • uv run ruff check veadk/cli/codex_app_server.py veadk/cli/frontend_sandbox.py tests/cli/test_codex_app_server.py tests/cli/test_frontend_sandbox.py
  • targeted pre-commit hooks and secret scan

Manual validation

  • deploy the fork branch and expire the Studio OAuth session during a Sandbox conversation
  • confirm reauthentication retries the pending message without an empty-reply error
  • leave a Codex session open for at least 20 minutes and confirm the next message resumes the same thread without a gateway WebSocket lifetime error

Notes

  • Draft pending deployed-environment validation.
  • Pyright was not available in the current development environment.

@zakahan
zakahan force-pushed the fix/studio-codex-websocket-reconnect branch from 41998ed to dcd3e82 Compare August 17, 2026 03:31
@zakahan
zakahan force-pushed the fix/studio-codex-websocket-reconnect branch from dcd3e82 to 3b5796f Compare August 17, 2026 03:41
@zakahan
zakahan marked this pull request as ready for review August 17, 2026 03:42
@yaozheng-fang
yaozheng-fang merged commit 0966831 into volcengine:main Aug 17, 2026
7 checks passed
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.

2 participants