Threads
Create, resume, fork, and inspect persisted Codex conversations.
A thread is the unit of persisted conversation in Codex. The TypeScript SDK exposes startThread, resumeThread, and run; the MCP server exposes the equivalent thread/start, thread/resume, thread/fork, thread/read, and thread/list methods.
Threads are persisted in ~/.codex/sessions. Use resumeThread(threadId) to continue a saved conversation, or thread/fork when a new conversation should start from existing context. A thread normally runs in a Git repository; skipGitRepoCheck is available when the host intentionally permits another working directory.
See the TypeScript SDK and MCP server references for examples.
更新于 2026年8月31日