Repository navigation
CLI: command approval dialog leaks into unrelated Codex sessions across worktrees #48349
Description
Activity
- addedbugSomething isn't workingSomething isn't workingCLIIssues related to the Codex CLIIssues related to the Codex CLIsandboxIssues related to permissions or sandboxingIssues related to permissions or sandboxingTUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaysessionIssues involving session (thread) management, resuming, forking, naming, archivingIssues involving session (thread) management, resuming, forking, naming, archiving
on Sep 26, 2026 (response from codex)
Thanks for the detailed report. We investigated the approval-routing path in Codex 0.157.1 and confirmed that approval requests are scoped to app-server connections subscribed to the owning thread; pending approvals are also keyed by thread ID.
The reported reproduction relies entirely on Herdr, which owns the pane PTYs, derives status from terminal output, records Codex session identities, and can restore panes with
codex resume <id>. Without logs, actual thread IDs, a public recording, or a reproduction in independent terminals, we don’t have evidence that Codex routed an approval to an unrelated session rather than Herdr duplicating or restoring a pane/session attachment.We’re closing this as an external integration issue. If this reproduces in separate ordinary terminals or tmux without Herdr, please open a new issue with the thread IDs and redacted logs/video, and we’ll investigate.
I am experiencing this issue as well, with an additional serious usability problem.
I run multiple Codex CLI sessions in separate Linux terminals, working on different projects.
When one Codex session requests command approval, the approval dialog can appear in another unrelated terminal and interrupt what I am actively typing.
This is more than an inconvenient notification. It disrupts the workflow, creates confusion about which session is requesting authorization, and introduces the risk of accidental approval through unintended keyboard input.
Expected behavior:
- Each Codex instance must handle its own approval requests.
- Approval dialogs must never interrupt input in unrelated sessions.
- Terminal input should remain isolated between independent Codex instances.
- Users must be able to work in multiple terminals simultaneously without interference.
Disabling approvals or bypassing the sandbox is not an acceptable workaround, because it sacrifices security to compensate for a user-interface defect.
Please reconsider this issue. Session isolation should be a fundamental requirement for a professional command-line development tool.
@sbasurto, are you using Herdr? If so, please report the issue to them. If you're not, please open a new bug report and use
/feedbackto send your logs. That will allow us to investigate further.6. @sbasurto, are you using Herdr? If so, please report the issue to them. If you're not, please open a new bug report and use
/feedbackto send your logs. That will allow us to investigate further.Sorry what is Herdr?, I am using codex in gentoo with terminator terminal. The codex version is: OpenAI Codex (v0.162.0).
@sbasurto, this bug report was closed because the behavior was diagnosed as a problem with Herdr, which is an alternate TUI that uses the codex harness. If you're not using Herdr, then you are not seeing the same bug. Please open a new bug report with the details requested in the bug template.
What version of Codex CLI is running?
codex-cli 0.157.1What subscription do you have?
Not disclosed.
Which model were you using?
gpt-6-solin the requesting thread. Other Codex sessions were open concurrently.What platform is your computer?
Linux x86_64 (
uname -mprs:Linux 7.2.7-1-cachyos-server x86_64 unknown). Multiple Codex CLI TUIs ran in separate Herdr 0.9.1 panes, each in a different Git worktree.What terminal emulator and version are you using?
Herdr 0.9.1 multiplexed the Codex panes. Outer terminal details were not captured.
Codex doctor report
codex doctor --jsoncompleted. Overall status waswarningbecauseconfig.loadreported an unrecognized configuration setting; config parsing succeeded. The full report is withheld because it includes local paths and configuration metadata. Nonotifyortui.notificationsoverride is configured.What issue are you seeing?
A command-approval dialog belonging to one Codex thread is rendered inside other Codex CLI sessions in unrelated worktrees. A 38-second screen recording shows the same modal's
Thread: Agent (<same thread ID>)field in at least two different Codex panes that visibly contain unrelated conversations. The requested command changes as the originating thread makes subsequent requests, but the unrelated panes show the new approval modal too.Herdr then marks those panes as
Action Required, apparently because their terminal screens now contain a real Codex approval dialog. The reporter also hears spurious completion sounds when the originating thread finishes; the video supports the approval/UI and Herdr state behavior, but does not establish the sound's underlying event path.This is not just a notification banner: the full interactive
Would you like to run the following command?dialog, with Yes/No choices, appears in a different session's TUI. I did not test whether accepting from the wrong pane executes the command, so approval execution crossing remains unconfirmed. Nevertheless, the UI makes it hard to know which session owns the requested command.What steps can reproduce the bug?
Thread: AgentID from A is visible over each unrelated conversation, and Herdr labels multiple panesAction Required.The issue was observed with several panes open. The screen recording includes private project text and paths, so it is not attached publicly. A redacted excerpt can be prepared if maintainers need it.
What is the expected behavior?
Only the Codex session that owns the command request should render its approval dialog. Other sessions should continue displaying their own conversation and should not become actionable due to a foreign thread's request. If cross-session approval notification is intentional, it should identify the owning thread and must not replace another session's interactive TUI state.
Additional information
SessionStart. Herdr's Codex lifecycle state is screen-detected; the same foreign approval dialog was visibly present in the Codex panes themselves. This makes Herdr's simultaneousAction Requiredlabels a downstream effect rather than proof of a Herdr routing defect.tui.notifications = falsesetting can suppress Codex TUI notifications, but it does not explain or fix an interactive approval modal rendered in another thread's terminal.