Skip to content

Plugin: remove approval timeouts and surface pending prompt state #14

@huntharo

Description

@huntharo

Problem

The plugin should stop timing out approvals and pending questions.

Codex Desktop does not expire these interactions, and upstream TUI behavior suggests unresolved prompts are meant to survive thread switching/resume rather than auto-cancel.

Current Findings

  • The plugin currently converts timed-out approval prompts into { decision: "cancel" }.
  • Upstream TUI tracks unresolved interactive prompts and replays them on thread switch/resume.
  • App Server thread status exposes waitingOnApproval and waitingOnUserInput, which gives the plugin a way to surface "there is still a pending prompt here."

Proposed Scope

  • Remove plugin-side timeout cancellation for approvals and questionnaires.
  • Preserve pending input state across restarts/resume for as long as the App Server thread still considers the prompt active.
  • Make /codex_status surface whether the thread is still waiting on approval or user input.
  • Consider re-showing or rehydrating the pending prompt from status/resume flows when possible.

Open Question

We should verify the exact boundary between:

  • prompts that are still live in App Server/core and can be answered later
  • prompts that were only connection-scoped UI affordances and require a new turn to re-ask

But regardless, the plugin should not eagerly cancel them on its own.

Source Notes

  • Plugin timeout-to-cancel mapping: src/client.ts:2163
  • Pending request persistence in local store: src/state.ts:185
  • TUI note about replaying still-pending interactive prompts: codex-rs/tui/src/app.rs:345
  • Pending interactive replay machinery: codex-rs/tui/src/app/pending_interactive_replay.rs:23
  • TUI pending-thread approval UI: codex-rs/tui/src/bottom_pane/pending_thread_approvals.rs:11
  • App Server thread status type: codex-rs/app-server-protocol/schema/typescript/v2/ThreadStatus.ts:6
  • App Server active flags: codex-rs/app-server-protocol/schema/typescript/v2/ThreadActiveFlag.ts:5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Inbox

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions