Skip to content

Glossary

Codex thread

Last updated

Definition

A Codex thread is a single conversation between you and OpenAI's Codex agent, made up of turns: each turn is one request plus the work the agent does for it.

Also called: Codex chat, Codex session, Codex conversation.

“Thread” is the word Codex's app server uses for a conversation (thread/start, thread/resume, thread/fork). The Codex interface mostly says chat or session, but it's the same thing. A turn contains items: your message, the agent's replies, commands it ran, file changes and tool calls.

Codex saves threads on your machine as JSONL “rollout” files in ~/.codex/sessions, and keeps a local SQLite state database in ~/.codex as well. Archived threads move to a separate archive folder and can be restored.

CommandWhat it does
codex resume --last or codex resume <id>reopen a thread interactively
codex fork <id>start a new thread from a copy of an earlier one
codex exec resume --lastcontinue a thread non-interactively

When Codex delegates work, each subagent runs in its own agent thread that you can open separately. The Claude Code counterpart is a Claude Code session.

In Pairbar

Pairbar reads Codex's state database (read-only) and the rollouts in ~/.codex/sessions, and lists each thread in the Chats tab alongside Claude sessions. Rename… renames a thread in Codex itself through your codex tool, Archive uses Codex's own archive, and Send message… queues a message on the thread even while it's working. See Renaming and Send a message.

Frequently asked questions

Is a Codex thread the same as a Codex session or chat?
Yes. Thread is the term in Codex's app-server API; the interface and CLI help more often say chat or session for the same conversation.
Where are Codex threads stored?
Locally, as rollout files in ~/.codex/sessions, with a state database alongside them in ~/.codex.
Can Pairbar rename a Codex thread?
Yes. It asks your codex command-line tool to rename it, so the new name shows in the Codex app and codex resume. If that can't be done, the name is kept in Pairbar only and Pairbar says so.