misc
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ExecPolicyAmendment codexed.models.misc Proposed execpolicy amendment (prefix rule). |
||
| McpServerStatusEntry codexed.models.misc Status of a single MCP server. |
||
| NetworkApprovalContext codexed.models.misc Network approval context for command approvals. |
||
| NetworkPolicyAmendment codexed.models.misc Proposed network policy amendment. |
||
| SkillRequestApprovalResponse codexed.models.misc Response for skill/requestApproval server request. |
||
| Thread codexed.models.misc |
||
| ToolRequestUserInputAnswer codexed.models.misc A user's answer to a request_user_input question. |
||
| ToolRequestUserInputOption codexed.models.misc A selectable option for a user input question. |
||
| ToolRequestUserInputQuestion codexed.models.misc A question in a tool request for user input. |
||
| Turn codexed.models.misc Turn data structure. |
||
| TurnData codexed.models.misc Turn data in responses. |
||
| TurnsPage codexed.models.misc A page of turns. |
🛈 DocStrings¶
Pydantic models for Codex JSON-RPC API requests and responses.
ExecPolicyAmendment
¶
Bases: CodexBaseModel
Proposed execpolicy amendment (prefix rule).
Source code in src/codexed/models/misc.py
McpServerStatusEntry
¶
Bases: CodexBaseModel
Status of a single MCP server.
Source code in src/codexed/models/misc.py
NetworkApprovalContext
¶
NetworkPolicyAmendment
¶
SkillRequestApprovalResponse
¶
Bases: CodexBaseModel
Response for skill/requestApproval server request.
Source code in src/codexed/models/misc.py
Thread
¶
Bases: CodexBaseModel
Source code in src/codexed/models/misc.py
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
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.
created_at
instance-attribute
¶
Unix timestamp (in seconds) when the thread was created.
ephemeral
instance-attribute
¶
Whether the thread is ephemeral and should not be materialized on disk.
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.
model_provider
instance-attribute
¶
Model provider used for this thread (for example, 'openai').
name
class-attribute
instance-attribute
¶
Optional user-facing thread title.
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.
recency_at
class-attribute
instance-attribute
¶
Unix timestamp (in seconds) used to order threads by recency.
source
instance-attribute
¶
Origin of the thread (CLI, VSCode, codex exec, codex app-server, etc.).
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.
ToolRequestUserInputAnswer
¶
Bases: CodexBaseModel
A user's answer to a request_user_input question.
Source code in src/codexed/models/misc.py
ToolRequestUserInputOption
¶
ToolRequestUserInputQuestion
¶
Bases: CodexBaseModel
A question in a tool request for user input.
Source code in src/codexed/models/misc.py
to_schema_property
¶
Convert a Codex user input question to a JSON Schema property.
Maps question options to enum values, and handles secret/free-text questions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
question
|
Codex question with optional options list |
required |
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
JSON Schema property definition |
Source code in src/codexed/models/misc.py
Turn
¶
Bases: CodexBaseModel
Turn data structure.
Source code in src/codexed/models/misc.py
completed_at
class-attribute
instance-attribute
¶
Unix timestamp (in seconds) when the turn completed.
duration_ms
class-attribute
instance-attribute
¶
Duration between turn start and completion in milliseconds, if known.
error
class-attribute
instance-attribute
¶
error: TurnError | None = None
Only populated when the Turn's status is failed.
final_response
property
¶
Extract the final assistant response text from this turn.
Looks for the last ThreadItemAgentMessage with phase="final_answer".
Falls back to the last agent message with no phase (for models that don't
emit phase metadata). Returns None if the turn has no agent messages.
For structured output turns, this returns the raw JSON string.
items
instance-attribute
¶
Only populated on a thread/resume or thread/fork response.
For all other responses and notifications returning a Turn, the items field will be an empty list.
items_view
class-attribute
instance-attribute
¶
How completely the turn's items are included in this payload.
started_at
class-attribute
instance-attribute
¶
Unix timestamp (in seconds) when the turn started.
TurnData
¶
Bases: CodexBaseModel
Turn data in responses.
Source code in src/codexed/models/misc.py
items_view
class-attribute
instance-attribute
¶
How completely the turn's items are included in this payload.