Skip to content

ThreadResumeParams

Base classes

Name Children Inherits
CodexBaseModel
codexed.models.base
Base model for all Codex API models.

⋔ Inheritance diagram

graph TD
  939492100["v2_protocol.ThreadResumeParams"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  3116041069 --> 939492100
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: CodexBaseModel

There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.

For non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.

If thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.

Prefer using thread_id whenever possible.

Source code in src/codexed/models/v2_protocol.py
class ThreadResumeParams(CodexBaseModel):
    """There are three ways to resume a thread: 1. By thread_id: load the thread from disk by thread_id and resume it. 2. By history: instantiate the thread from memory and resume it. 3. By path: load the thread from disk by path and resume it.

    For non-running threads, the precedence is: history > non-empty path > thread_id. If using history or a non-empty path for a non-running thread, the thread_id param will be ignored.

    If thread_id identifies a running thread, app-server rejoins that thread and treats a non-empty path as a consistency check against the active rollout path. Empty string path values are treated as absent.

    Prefer using thread_id whenever possible.
    """

    approval_policy: AskForApproval | None = None
    approvals_reviewer: ApprovalsReviewer | None = None
    """
    Override where approval requests are routed for review on this thread and subsequent turns.
    """
    base_instructions: str | None = None
    config: dict[str, Any] | None = None
    cwd: str | None = None
    developer_instructions: str | None = None
    exclude_turns: bool | None = None
    """
    When true, return only thread metadata and live-resume state without populating `thread.turns`. This is useful when the client plans to call `thread/turns/list` immediately after resuming. Full-history hydration is deprecated for paginated threads; use this with `thread/turns/list` and `thread/items/list` instead.
    """
    history: list[ResponseItem] | None = None
    """
    [UNSTABLE] FOR CODEX CLOUD - DO NOT USE. If specified, the thread will be resumed with the provided history instead of loaded from disk.
    """
    initial_turns_page: ThreadResumeInitialTurnsPageParams | None = None
    """
    When present, include a `thread/turns/list` page in the resume response so clients can bootstrap recent turns without a second request.
    """
    model: str | None = None
    """
    Configuration overrides for the resumed thread, if any.
    """
    model_provider: str | None = None
    path: str | None = None
    """
    [UNSTABLE] Specify the rollout path to resume from. If specified for a non-running thread, the thread_id param will be ignored. If thread_id identifies a running thread, the path must match the active rollout path.
    """
    permissions: str | None = None
    """
    Named profile id for the resumed thread. Cannot be combined with `sandbox`.
    """
    personality: Personality | None = None
    """
    @deprecated `friendly` and `pragmatic` no longer select a style. Changing this does not rewrite the thread's existing instructions.
    """
    runtime_workspace_roots: list[AbsolutePathBuf] | None = None
    """
    Replace the thread's runtime workspace roots. Paths must be absolute.
    """
    sandbox: SandboxMode | None = None
    service_tier: str | None = None
    thread_id: str

approvals_reviewer class-attribute instance-attribute

approvals_reviewer: ApprovalsReviewer | None = None

Override where approval requests are routed for review on this thread and subsequent turns.

exclude_turns class-attribute instance-attribute

exclude_turns: bool | None = None

When true, return only thread metadata and live-resume state without populating thread.turns. This is useful when the client plans to call thread/turns/list immediately after resuming. Full-history hydration is deprecated for paginated threads; use this with thread/turns/list and thread/items/list instead.

history class-attribute instance-attribute

history: list[ResponseItem] | None = None

[UNSTABLE] FOR CODEX CLOUD - DO NOT USE. If specified, the thread will be resumed with the provided history instead of loaded from disk.

initial_turns_page class-attribute instance-attribute

initial_turns_page: ThreadResumeInitialTurnsPageParams | None = None

When present, include a thread/turns/list page in the resume response so clients can bootstrap recent turns without a second request.

model class-attribute instance-attribute

model: str | None = None

Configuration overrides for the resumed thread, if any.

path class-attribute instance-attribute

path: str | None = None

[UNSTABLE] Specify the rollout path to resume from. If specified for a non-running thread, the thread_id param will be ignored. If thread_id identifies a running thread, the path must match the active rollout path.

permissions class-attribute instance-attribute

permissions: str | None = None

Named profile id for the resumed thread. Cannot be combined with sandbox.

personality class-attribute instance-attribute

personality: Personality | None = None

@deprecated friendly and pragmatic no longer select a style. Changing this does not rewrite the thread's existing instructions.

runtime_workspace_roots class-attribute instance-attribute

runtime_workspace_roots: list[AbsolutePathBuf] | None = None

Replace the thread's runtime workspace roots. Paths must be absolute.

:fa-brands-github: Show source on GitHub