Pause active goals before TUI interrupts#28813
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eb3f3ee0dd
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91ce78ba32
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5845155d99
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6526ae96fe
ℹ️ 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".
Fixes #28104.
Summary
Active
/goalturns should leave the persisted goal paused whenever the TUI interrupts the running turn. The bug in #28104 showed this most visibly throughEsc: some interrupt paths aborted the turn without updating the goal status, so the goal could remain active and continue automatically.This change makes
ChatWidgetpause an active goal before the TUI sends an interrupt from the status-row path, the pending-steer path,Ctrl+C, or a request-user-input overlay. The modal overlay now reports whether a key will interrupt the turn, which keeps modalEscandCtrl+Cbehavior aligned with the normal interrupt paths.Manual Testing
Built the local CLI with
just codex --help, then launched the local TUI with goals enabled. Started an active/goalturn and interrupted it withEsc, then resumed and repeated withCtrl+C; both paths showedGoal paused, the interrupted-conversation message, and theGoal paused (/goal resume)footer. I also stopped the background terminal and exited the TUI cleanly after the run.I did not find a reliable standalone manual path to force the request-user-input overlay case, so that path is covered by the focused automated test.