Thread
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| CodexBaseModel codexed.models.base Base model for all Codex API models. |
â‹” Inheritance diagram¶
graph TD
2244257168["v2_protocol.Thread"]
3116041069["base.CodexBaseModel"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
3116041069 --> 2244257168
3879467795 --> 3116041069
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: CodexBaseModel
Source code in src/codexed/models/v2_protocol.py
8750 8751 8752 8753 8754 8755 8756 8757 8758 8759 8760 8761 8762 8763 8764 8765 8766 8767 8768 8769 8770 8771 8772 8773 8774 8775 8776 8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792 8793 8794 8795 8796 8797 8798 8799 8800 8801 8802 8803 8804 8805 8806 8807 8808 8809 8810 8811 8812 8813 8814 8815 8816 8817 8818 8819 8820 8821 8822 8823 8824 8825 8826 8827 8828 8829 8830 8831 8832 8833 8834 8835 8836 8837 8838 8839 8840 8841 8842 8843 8844 8845 8846 8847 8848 8849 8850 8851 8852 8853 8854 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 8872 8873 8874 8875 8876 8877 8878 8879 8880 8881 8882 | |
agent_nickname
class-attribute
instance-attribute
¶
Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
agent_role
class-attribute
instance-attribute
¶
Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
attached_to_thread_id
class-attribute
instance-attribute
¶
Parent that owns this persisted attached thread, independent of fork or spawn lineage.
can_accept_direct_input
class-attribute
instance-attribute
¶
Whether the app server accepts direct turn input for this loaded thread. None means the capability is unavailable, such as for an unloaded stored thread.
created_at
instance-attribute
¶
Unix timestamp (in seconds) when the thread was created.
daybreak_enabled
class-attribute
instance-attribute
¶
Saved Daybreak choice, independent of turn execution. Null if unset.
environments
class-attribute
instance-attribute
¶
environments: list[ThreadEnvironment] | None = None
Current environments for a loaded thread, in priority order, primary first. null means the thread is not loaded or the server does not expose its selection. An empty list means no environments are selected. This does not report connection status.
ephemeral
instance-attribute
¶
Whether the thread is ephemeral and should not be materialized on disk.
extra
class-attribute
instance-attribute
¶
extra: ThreadExtra | None = None
Optional implementation-specific thread data.
forked_from_id
class-attribute
instance-attribute
¶
Source thread id when this thread was created by forking another thread.
git_info
class-attribute
instance-attribute
¶
Optional Git metadata captured when the thread was created.
history_mode
class-attribute
instance-attribute
¶
Persisted thread history contract selected when this thread was created.
model
class-attribute
instance-attribute
¶
Current configured model when loaded, otherwise the latest persisted model. Null when unavailable. This is not per-turn execution telemetry.
model_provider
instance-attribute
¶
Model provider used for this thread (for example, 'openai').
name
class-attribute
instance-attribute
¶
Optional user-facing thread title.
originator
class-attribute
instance-attribute
¶
Originator recorded when the thread was created, independent of its current client or executor. Null when the recorded originator is unavailable.
parent_thread_id
class-attribute
instance-attribute
¶
The ID of the parent thread. This will only be set if this thread is a subagent.
path
class-attribute
instance-attribute
¶
[UNSTABLE] Path to the thread on disk.
preview
instance-attribute
¶
Usually the first user message in the thread, if available.
project_id
instance-attribute
¶
Canonical project assignment owned by app-server, if any.
reasoning_effort
class-attribute
instance-attribute
¶
reasoning_effort: ReasoningEffort | None = None
Current configured reasoning effort when loaded, otherwise the latest persisted effort. Null when unset or unavailable. This is not per-turn execution telemetry.
recency_at
class-attribute
instance-attribute
¶
Unix timestamp (in seconds) used for thread recency ordering.
section
class-attribute
instance-attribute
¶
section: ThreadSection | None = None
The independently persisted section selected for this thread, if any.
section_entered_at
class-attribute
instance-attribute
¶
Unix timestamp in seconds when the thread entered its current section.
session_id
instance-attribute
¶
Session id shared by threads that belong to the same session tree.
source
instance-attribute
¶
Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
thread_source
class-attribute
instance-attribute
¶
Optional analytics source classification for this thread.
turns
instance-attribute
¶
turns: list[Turn]
Only populated on thread/resume, thread/fork, and thread/read (when includeTurns is true) responses. For all other responses and notifications returning a Thread, the turns field will be an empty list.
updated_at
instance-attribute
¶
Unix timestamp (in seconds) when the thread was last updated.