DEV Community

Cover image for Manage Multiple OpenAI Codex CLI Tasks with codex agents and codex queue
Vladislav Guzey
Vladislav Guzey

Posted on

Manage Multiple OpenAI Codex CLI Tasks with codex agents and codex queue

๐ŸŽฅ Watch the demo: OpenAI Codex Agents Dashboard and codex queue

Running several Codex CLI tasks at once can turn your terminal tabs into a confusing task manager.

Codex now provides two commands that solve different parts of this problem:

  • codex agents shows your local tasks in one dashboard.
  • codex queue sends a new message to an existing task.

Here is how to use them together.

Requirements

Check your Codex version:

codex --version
Enter fullscreen mode Exit fullscreen mode

Update when necessary:

codex update
Enter fullscreen mode Exit fullscreen mode

For an npm installation:

npm install -g @openai/codex@latest
Enter fullscreen mode Exit fullscreen mode

Open the dashboard

Run this in your normal terminal:

codex agents
Enter fullscreen mode Exit fullscreen mode

OpenAI Codex CLI Agents Dashboard

The dashboard groups tasks by project and reports three states:

State Meaning
Need input The task is blocked on your answer or approval
Working The task is still running
Ready The current work is ready to review

Inside a Codex session, return to the dashboard with:

/agents
Enter fullscreen mode Exit fullscreen mode

Remember:

shell:        codex agents
inside Codex: /agents
Enter fullscreen mode Exit fullscreen mode

Rename important tasks

Unique names are easier to search and target:

frontend-accessibility
backend-rate-limits
docs-release-notes
Enter fullscreen mode Exit fullscreen mode

Select a task and press Ctrl+R, or rename it from the session:

/rename backend-rate-limits
Enter fullscreen mode Exit fullscreen mode

Queue a message by name

The syntax is:

codex queue --thread <NAME_OR_UUID> --message <TEXT>
Enter fullscreen mode Exit fullscreen mode

Example:

codex queue \
  --thread "backend-rate-limits" \
  --message "Add a regression test for concurrent requests."
Enter fullscreen mode Exit fullscreen mode

Use the full exact task name and quote both values.

Queue a message by session ID

Open the task and run:

/status
Enter fullscreen mode Exit fullscreen mode

Copy the Session UUID:

01a01234-abcd-7890-1234-123456789abc
Enter fullscreen mode Exit fullscreen mode

Then target it directly:

codex queue \
  --thread "01a01234-abcd-7890-1234-123456789abc" \
  --message "Run the full test suite before finishing."
Enter fullscreen mode Exit fullscreen mode

Names are convenient for manual use. UUIDs are better for scripts and duplicated task names.

Attach an image

You can include a visual reference:

codex queue \
  --thread "frontend-accessibility" \
  --message "Match the mobile header to this screenshot." \
  --image "/path/to/header-reference.png"
Enter fullscreen mode Exit fullscreen mode

Useful dashboard controls

  • Up / Down: navigate tasks
  • Enter: open a task
  • Ctrl+F: search
  • Ctrl+S: change grouping
  • Ctrl+R: rename
  • Ctrl+X: stop

Check the footer in your installed version because shortcuts may change.

Troubleshooting

The command is not available

Update Codex and open a new terminal:

codex update
codex --version
Enter fullscreen mode Exit fullscreen mode

The task cannot be found

Use the exact quoted name or copy the UUID from /status.

The dashboard is empty

Check the installation, authentication, app-server connection, and thread inventory:

codex doctor
Enter fullscreen mode Exit fullscreen mode

The message does not appear immediately

A busy task may process the queued instruction after its current work reaches a safe point. Open it from the dashboard and inspect the transcript.

Recommended workflow

codex agents
  โ†’ rename important tasks
  โ†’ handle Need input
  โ†’ review Ready tasks
  โ†’ queue quick follow-ups
  โ†’ use UUIDs in scripts
Enter fullscreen mode Exit fullscreen mode

That is the complete pattern: use the dashboard for visibility and codex queue for delivery.

For the full live walkthrough, watch the video tutorial on YouTube.

Top comments (0)