ThreadForkParams
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| CodexBaseModel codexed.models.base Base model for all Codex API models. |
⋔ Inheritance diagram¶
graph TD
3872044706["v2_protocol.ThreadForkParams"]
3116041069["base.CodexBaseModel"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
3116041069 --> 3872044706
3879467795 --> 3116041069
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: CodexBaseModel
There are two ways to fork a thread: 1. By thread_id: load the thread from disk by thread_id and fork it into a new thread. 2. By path: load the thread from disk by path and fork it into a new thread.
If using a non-empty path, the thread_id param will be ignored. Empty string path values are treated as absent.
Prefer using thread_id whenever possible.
Source code in src/codexed/models/v2_protocol.py
9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 | |
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.
attach_to_source
class-attribute
instance-attribute
¶
Persist the fork as an attached thread of its resolved source, hidden from ordinary lists. The source cannot be deleted while attached threads exist. Requires a paginated source and local storage; incompatible with ephemeral and deferGoalContinuation. Omitted or false creates an ordinary fork.
before_turn_id
class-attribute
instance-attribute
¶
Optional turn id to fork before, excluding that turn and all later turns. Cannot be combined with last_turn_id.
defer_goal_continuation
class-attribute
instance-attribute
¶
When true, carry the source thread's current goal into the fork without starting its initial automatic continuation. The next explicit turn owns the goal lifecycle, and normal automatic continuation resumes after it.
exclude_turns
class-attribute
instance-attribute
¶
When true, return only thread metadata and live fork state without populating thread.turns. This is useful when the client plans to call thread/turns/list immediately after forking. Full-history hydration is deprecated for paginated threads; use this with thread/turns/list and thread/items/list instead.
experimental_disable_prediction_mcp
class-attribute
instance-attribute
¶
Disable MCP servers in prediction mode when the inherited window uses incremental tools on Responses Lite. Requires experimentalPredictionMode: true.
experimental_prediction_mode
class-attribute
instance-attribute
¶
Start from the loaded parent's effective config, tools, environments, and persisted history to maximize prompt-cache reuse. Requires a loaded, persisted parent and ephemeral: true. Enables features.reasoning_effort_override on the fork. Only config.thread_unload_delay_secs may override the inherited config. Cannot be combined with path, lastTurnId, or beforeTurnId.
last_turn_id
class-attribute
instance-attribute
¶
Optional last turn id to fork through, inclusive.
When specified, turns after last_turn_id are omitted from the fork. The referenced turn cannot be in progress.
model
class-attribute
instance-attribute
¶
Configuration overrides for the forked thread, if any.
path
class-attribute
instance-attribute
¶
[UNSTABLE] Specify the rollout path to fork from. If specified, the thread_id param will be ignored.
permissions
class-attribute
instance-attribute
¶
Named profile id for the forked thread. Cannot be combined with sandbox.
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.
thread_source
class-attribute
instance-attribute
¶
Optional client-supplied analytics source classification for this forked thread.