Repository navigation
feat: wake a chat on matching output lines of a watched process - #269
Conversation
…ed process wait_for_events takes process_output_pattern, a regular expression for the output lines of its process_ids, with process_output_cooldown_seconds (default 60) and process_output_max_events (default 10). While a watched process runs, each poll matches the complete lines printed after the last line message and sends one message with them, at most once per cool-down after the wake-up's last message and up to the maximum per process. The exit message still follows. The final poll reports exits only.
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: b7ccfe11ce
ℹ️ 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 |
|
Codex Review: Didn't find any major issues. Chef's kiss. 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_output_pattern, an RE2 regular expression for the output lines of itsprocess_ids. While a watched process runs, the chat gets a message with the new complete lines that match. The exit message still follows.process_output_cooldown_seconds(0 to 86400, default 60): a message for matching lines waits at least this long after the wake-up's last message, and collects the lines printed meanwhile.process_output_max_events(1 to 100, default 10): at most this many line messages per process. The last one says so, and the exit still wakes the chat.process_ids, an invalid or longer than 1 KB pattern, out-of-range values, and the cool-down or maximum without a pattern. The resolved values are stored on eachprocess_exitevent, so they survive a coderd restart.process_output:<process id>:<position>, where the position is the byte offset in the process's whole output after the last line it covered. The next poll reads only complete lines after that position. Once the agent truncates the output (first and last 16 KiB,agentproc.HeadTailBuffer), only lines after its omission marker count, minus the first one, which may have lost its start. Lines that the agent dropped between two polls are missed.ARCHITECTURE.mdgets one TODO for Mike.The UI follows in a later PR.