[codex] Add chat-v2 attach-or-embed startup#154
Conversation
18cc707 to
d8f2f5a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8f2f5a502
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| shuttingDown = true; | ||
| runtime.close() |
There was a problem hiding this comment.
Close the TUI before awaiting embedded shutdown
When an external SIGTERM/SIGINT reaches an embedded chat-v2 process after the TUI has started, this handler awaits runtime.close() while the mounted app still owns live tRPC/EventSource subscriptions (ControlPlaneSessionSubscriptionService only unsubscribes from App unmount). The HTTP server close path waits for active connections to finish, so those open subscriptions can keep runtime.close() from resolving and the .finally(process.exit) path is never reached. The signal path should first unmount/dispose the Ink app or otherwise force-close client/server connections before awaiting the server close.
Useful? React with 👍 / 👎.
d8f2f5a to
abe785a
Compare
Summary
Adds the PR 3 chat-v2 startup behavior on top of the merged server lifecycle split.
Expected behavior change
yarn chat:dev:v2 no longer requires a pre-running heddle daemon or yarn server:dev.
Expected user-visible behavior:
This PR does not do the later PR 4 cleanup of request-workspace assumptions, logging placement, or heartbeat catalog ownership.
How to verify
Manual smoke:
Automated checks run locally: