Auto-continue after shell escape (!) commands

Resolved 💬 2 comments Opened Feb 23, 2026 by alexeyv Closed Mar 23, 2026

Feature request: Auto-continue after ! (shell escape) commands

Problem

When the agent reaches a point where the user needs to run a command manually (e.g., git push which is intentionally prohibited for the agent), the workflow is:

  1. Agent says "please run git push"
  2. User runs ! git push via shell escape
  3. Push completes
  4. User must type something (even a single character) to give the agent back control
  5. Agent continues

Step 4 is unnecessary friction. The user has already completed the manual action — there's nothing to decide or clarify. The agent should automatically resume.

Proposed solution

Add an option to auto-continue the conversation after a ! shell escape command completes. This could be:

  • A setting like "autoContinueAfterShellEscape": true
  • A variant of the ! syntax (e.g., !! git push to auto-continue)
  • A hook event that can signal "continue with no additional input"

Why hooks don't solve this today

  • PostToolUse fires after agent-initiated tool calls, not after user ! commands
  • Stop fires when the agent finishes its turn, not when the user finishes a manual command
  • No hook can inject or auto-submit user input to start a new agent turn

Use case

This is common in workflows where certain actions (like git push) are deliberately kept manual for safety, but the agent needs to continue afterward (e.g., to create a PR, update status, or move to the next task). The manual "type something to continue" step breaks flow without adding any value.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗