Skip to content

Retain queued prompts when temporarily switching to subagent thread #13180

Closed as not planned

Description

@darlingm

What version of Codex CLI is running?

0.106.0

What subscription do you have?

pro

Which model were you using?

gpt-5.3-codex

What platform is your computer?

Linux 6.18.8-arch2-1 x86_64 unknown

What terminal emulator and version are you using (if applicable)?

st (suckless), tmux 3.6a

What issue are you seeing?

If a prompt(s) is queued (using tab) and /agent is used to switch to another and back, the ququeed prompt disappears and never executes.

What steps can reproduce the bug?

  1. Enter "Start 2 subagents that sleep 30, and wait for them."
  2. Enter "Say hello"
  3. Press TAB
  4. /agent, and switch to a subagent
  5. /agent, and switch back to the main agent
  6. Observe the task queue is gone, and after the subagents finish it never says hello, so it's not just a display omission.

What is the expected behavior?

The queued prompt(s) should still execute normally

Additional information

No response

Activity

  1. added
    bug
    on Mar 1, 2026
  2. added
    CLI
    TUI
    on Mar 1, 2026
  3. etraut-openai commented on Mar 1, 2026

    @etraut-openai
    Contributor

    This is by design, not a bug.

    If you want to continuously run more than one agent and retain ephemeral state like queued prompts, you can open multiple terminals, one for each thread.

    If you'd like to suggest an alternative behavior, feel free to open a feature request, and we'll see if it gets upvoted by the community.

  4. darlingm commented on Mar 1, 2026

    @darlingm
    ContributorAuthor

    I want to check if my report was unclear/misunderstood. I'm not trying to run multiple interactive sessions, which is what I take "continuously run more than one agent" to mean. I only switch focus briefly to inspect a subagent, then switch back. For reasons like checking what prompt was sent by the main agent, seeing how it's going about it, seeing why 1 sub-agent out of 4 that got the same prompt is still running long after the other 3 finished, etc.

    So, I'm not looking to have Codex CLI avoid running multiple terminals for situations where that should be done. I'm looking for Codex to not silently drop a queued action when I temporarily view another thread.

    In this workflow, queued prompts on the main agent are silently removed. Even if queue state is ephemerial by design, losing queued work without warning is surprising and looks like a bug.

    If this behavior is desired, I think it would be worth having it explain the queue list will be cleared and ask for permission before switching, if the queue is not empty.

  5. added
    enhancement
    and removed
    bug
    CLI
    on Mar 1, 2026
  6. etraut-openai commented on Mar 1, 2026

    @etraut-openai
    Contributor

    Ah, I missed the fact that you're switching to subagents rather than separate threads.

    Reopening and changing from a bug report to an enhancement request.

  7. changed the title [-]Queued prompts disappear and never run after switching agents[/-] [+]Retain queued prompts when temporarily switching to subagent thread[/+] on Mar 1, 2026
  8. etraut-openai commented on Apr 3, 2026

    @etraut-openai
    Contributor

    This feature request hasn't received enough upvotes, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions