Skip to content

Add agents.interrupt_message for interruption markers#19351

Merged
jif-oai merged 1 commit into
mainfrom
jif/configurable-interruption-message
Apr 24, 2026
Merged

Add agents.interrupt_message for interruption markers#19351
jif-oai merged 1 commit into
mainfrom
jif/configurable-interruption-message

Conversation

@jif-oai
Copy link
Copy Markdown
Collaborator

@jif-oai jif-oai commented Apr 24, 2026

Why

Agent interruptions currently always persist a model-visible interrupted-turn marker before emitting TurnAborted. That marker is useful by default because it gives the next model turn context about a deliberately interrupted task, but some deployments need to suppress that history injection entirely while still keeping the client-visible interruption event.

What changed

  • Add [agents] interrupt_message = false to disable the model-visible interrupted-turn marker.
  • Resolve the setting into Config::agent_interrupt_message_enabled, defaulting to true so existing behavior is unchanged.
  • Apply the setting to both live interrupted turns and interrupted fork snapshots.
  • Keep emitting TurnAborted even when the history marker is disabled.
  • Regenerate core/config.schema.json for the new agents.interrupt_message field.

Testing

  • cargo test -p codex-core load_config_resolves_agent_interrupt_message -- --nocapture
  • cargo test -p codex-core disabled_interrupted_fork_snapshot_appends_only_interrupt_event -- --nocapture
  • cargo test -p codex-core multi_agent_v2_interrupted_marker_uses_developer_input_message -- --nocapture
  • cargo test -p codex-core multi_agent_v2_followup_task_can_disable_interrupted_marker -- --nocapture
  • cargo test -p codex-core multi_agent_v2_followup_task_interrupts_busy_child_without_losing_message -- --nocapture
  • cargo check -p codex-core
@jif-oai jif-oai requested a review from a team as a code owner April 24, 2026 11:56
@jif-oai jif-oai changed the title feat: add config parameter for interruption Add agents.interrupt_message for interruption markers Apr 24, 2026
@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Apr 24, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Delightful!

ℹ️ 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".

@jif-oai
Copy link
Copy Markdown
Collaborator Author

jif-oai commented Apr 24, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ 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".

@jif-oai jif-oai merged commit 2874286 into main Apr 24, 2026
25 checks passed
@jif-oai jif-oai deleted the jif/configurable-interruption-message branch April 24, 2026 14:02
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

1 participant