Commit Graph

1 Commits

  • [codex] handle request_user_input in app-server test client (#29476)
    ## Why
    
    `codex-app-server-test-client` previously treated
    `item/tool/requestUserInput` as an unsupported server request and
    terminated the connection. That made it impossible to use the client for
    end-to-end testing of interactive turns: an operator could observe the
    request, but could not answer it and confirm that the same turn resumed.
    
    ## What changed
    
    - Handle `ToolRequestUserInput` server requests in the test client's
    central request dispatcher.
    - Render numbered terminal choices, accept exact option labels, support
    free-form `Other` and text-only questions, and collect multiple answers.
    - Send a protocol-native `ToolRequestUserInputResponse` and continue
    streaming the active turn.
    - Fail clearly when interactive input is requested without a terminal.
    - Document the interactive behavior and add focused tests for option
    selection, free-form answers, multiple questions, and invalid-selection
    retries.
    
    ## Testing
    
    - `just test -p codex-app-server-test-client`
    - `just bazel-lock-check`
    - Manually exercised the app-server flow, selected `TUI`, observed
    `serverRequest/resolved`, and verified that the same turn completed with
    the selected answer.