Repository navigation
feat: wake a chat when a watched background process exits - #263
Conversation
wait_for_events takes process_ids: background processes that execute started for this chat. The wake-up worker polls the chat's workspace agent once per tick with ProcessOutput and sends one message per process when it exits, with its exit code and the end of its output, or a lost-watch message when the workspace stopped or was rebuilt or the agent no longer knows the process. A failed read retries after a minute.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44d8c04b3b
ℹ️ 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".
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48f998c145
ℹ️ 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".
…process watches in the guard
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbc21eee57
ℹ️ 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".
…ls and retry failed final reads
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 31a872fedc
ℹ️ 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".
…nd report signal kills
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Merge evidence for head
|
Part of #248
wait_for_eventstakesprocess_ids, thebackground_process_idvalues thatexecutereturns. The chat gets one message per process when it exits, with its exit code and the last 40 lines (at most 4 KB) of its output.ProcessOutputcall on the chat's workspace agent and refuses IDs the agent does not know for this chat, IDs an active wake-up already watches, empty IDs, and more than 10 IDs.process_exitevent per process (process ID, command, agent ID) inchat_wakeups.events, so the watch survives a coderd restart. Each tick it reads the workspace's latest build once and dials each agent once.codersdk.ChatWakeupEventgainsprocess_idandcommand. The apidoc,schemas.mdandtypesGenerated.tsare regenerated.ARCHITECTURE.mdgets one TODO for Mike.Output-pattern wake-ups (pattern, cool-down, maximum events) and the UI follow in later PRs.