Skip to content

[Enhancement] [CLI] Cannot type/queue prompts during actions (unlike other AI tools) #103

@neubig

Description

@neubig

Problem

Users cannot type or provide input while the agent is executing actions, unlike other AI tools (e.g., Claude) where users can interrupt or provide guidance during execution.

Current Behavior

  • When agent is running, input is blocked
  • Users must use Ctrl-P to pause, then provide input
  • No way to provide real-time guidance or corrections

Expected Behavior

  • Allow users to type during action execution
  • Provide immediate feedback or corrections
  • Similar UX to Claude and other AI tools where users can interrupt naturally

User Experience Impact

  • Frustration: Cannot provide immediate feedback
  • Workflow interruption: Must pause, then speak, then resume
  • Missed opportunities: Cannot guide the agent in real-time

Current Workaround

Users must:

  1. Press Ctrl-P to pause
  2. Wait for pause confirmation
  3. Type their message
  4. Use /resume to continue

Proposed Solution

  1. Concurrent input: Allow input during action execution
  2. Smart interruption: Automatically pause when user starts typing
  3. Queue management: Handle user input appropriately during execution

Technical Context

The issue is in the input handling during agent execution. The process_agent_pause() function only listens for specific key combinations, and the main input loop is blocked during execution.

Related Files

  • openhands/cli/tui.py (process_agent_pause function, read_prompt_input)
  • openhands/cli/main.py (event handling and input management)

Comparison

  • Claude: Users can type anytime and the system handles interruption gracefully
  • OpenHands CLI: Requires explicit pause before input

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions