openai / openai/codex

Feature request: expose a hook for request_user_input

Open
#40,164 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app CLI enhancement hooks
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

Feature request: expose a hook for request_user_input

What would you like to see?

Please expose a lifecycle hook/event when Codex presents a structured request_user_input prompt to the user (for example, a form with questions and selectable options).

Why is this useful?

Users may be away from the screen while Codex is waiting for an answer. A dedicated hook would allow integrations to provide an accessible notification, such as macOS text-to-speech, a desktop notification, or a remote alert.

This should be distinct from PermissionRequest: an approval request is a security/authorization event, while request_user_input is a normal conversational decision point.

Proposed behavior

Add a documented hook event, for example UserInputRequest or RequestUserInput, containing safe metadata such as:

  • the number of questions/options;
  • a short, sanitized summary or title;
  • session/thread identifier if available.

The hook should run when the prompt becomes available to the user, without exposing sensitive field values by default.

Example configuration:

[hooks]
RequestUserInput = [
  { matcher = "", hooks = [
    { type = "command", command = "say 'Codex precisa de uma resposta'", async = true },
  ] },
]
Alternatives considered

Using PermissionRequest is not appropriate because it is not emitted for normal user-input forms and represents a different interaction. Monitoring terminal/UI output would be fragile and would not work consistently across Codex clients.

Environment
  • macOS
  • Codex CLI/Desktop
  • Global hooks configuration

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing PermissionRequest hook and the request_user_input lifecycle in Codex CLI/Desktop. Define where the new documented hook becomes available, what safe metadata it carries, and how global hooks configuration invokes it without exposing sensitive field values.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, desktop, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
43/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.