Skip to content

Queue follow-up input during user shell commands#18820

Merged
etraut-openai merged 1 commit intomainfrom
etraut/queue-shell-cmd
Apr 21, 2026
Merged

Queue follow-up input during user shell commands#18820
etraut-openai merged 1 commit intomainfrom
etraut/queue-shell-cmd

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

@etraut-openai etraut-openai commented Apr 21, 2026

Fixes #17954.

Why

When a manual shell command like !sleep 10 is running, submitting plain text such as hi currently sends that text as a steer for the active shell turn. User shell turns are not steerable like model turns, so the TUI can remain stuck in Working after the shell command finishes.

What Changed

  • Detect when the only active work is one or more ExecCommandSource::UserShell commands.
  • Queue plain submitted input in that state so it drains after the shell command and shell turn complete.
  • Preserve !cmd submissions during running work so explicit shell commands keep their existing behavior.
  • Add regression coverage for the !sleep 10 plus hi flow in chatwidget::tests::exec_flow::user_message_during_user_shell_command_is_queued_not_steered.

Verification

  • Manually confirmed hang before the fix and no hang after the fix

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

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

Replicated the issue and confirmed it is fixed in this branch.

Code looks good to me, approved!

@etraut-openai etraut-openai merged commit b7fec54 into main Apr 21, 2026
25 checks passed
@etraut-openai etraut-openai deleted the etraut/queue-shell-cmd branch April 21, 2026 17:13
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

steer does not work with shell commands

2 participants