Skip to content

Pause active goals before TUI interrupts#28813

Open
etraut-openai wants to merge 11 commits into
mainfrom
etraut/pause-goal-on-esc-interrupt
Open

Pause active goals before TUI interrupts#28813
etraut-openai wants to merge 11 commits into
mainfrom
etraut/pause-goal-on-esc-interrupt

Conversation

@etraut-openai

@etraut-openai etraut-openai commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Fixes #28104.

Summary

Active /goal turns should leave the persisted goal paused whenever the TUI interrupts the running turn. The bug in #28104 showed this most visibly through Esc: some interrupt paths aborted the turn without updating the goal status, so the goal could remain active and continue automatically.

This change makes ChatWidget pause 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 modal Esc and Ctrl+C behavior 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 /goal turn and interrupted it with Esc, then resumed and repeated with Ctrl+C; both paths showed Goal paused, the interrupted-conversation message, and the Goal 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/interaction.rs Outdated
Comment thread codex-rs/tui/src/chatwidget/interaction.rs Outdated
Comment thread codex-rs/tui/src/chatwidget/tests/status_and_layout.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/interaction.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/tests/status_and_layout.rs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codex-rs/tui/src/chatwidget/interaction.rs
@etraut-openai etraut-openai changed the title Pause active goals before Esc interrupts Pause active goals before TUI interrupts Jun 18, 2026
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.

Esc interrupt leaves /goal status active instead of paused

1 participant