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.
| Command | What 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 --last | continue 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
codexcommand-line tool to rename it, so the new name shows in the Codex app andcodex resume. If that can't be done, the name is kept in Pairbar only and Pairbar says so.
Related
- GlossaryClaude Code sessionA saved Claude Code conversation tied to a project folder, stored locally as a JSONL transcript and resumable later.
- GlossaryCodex cloud taskA job Codex runs in an OpenAI-hosted container set up from one of your cloud environments, returning a summary and a diff.
- Use caseSwitch between Claude Code and Codex on a Mac without hunting for windowsOne list for both apps; clicking a chat from the other app swaps its window into the same spot.
- Use caseOrganise Claude Code and Codex chats with labels, pins, renames and bulk actionsPins, labels, renames, hiding and multi-select for Claude Code and Codex chats, with a clear note on what changes in the apps and what stays in Pairbar.
- DocsChatsThe chat list: status, grouping, sorting, filters, pins, labels, hover details, subagents, bulk actions, the chat menu