Skip to content

BaseThreadItem

Sub classes

Name Children Inherits
ThreadItemUserMessage
codexed.models.thread_item
User message item.
    ThreadItemAgentMessage
    codexed.models.thread_item
    Agent message item.
      ThreadItemPlan
      codexed.models.thread_item
      Plan item.
        ThreadItemReasoning
        codexed.models.thread_item
        Reasoning item.
          ThreadItemCommandExecution
          codexed.models.thread_item
          Command execution item.
            ThreadItemFileChange
            codexed.models.thread_item
            File change item.
              ThreadItemMcpToolCall
              codexed.models.thread_item
              MCP tool call item.
                ThreadItemDynamicToolCall
                codexed.models.thread_item
                Dynamic tool call item.
                  ThreadItemWebSearch
                  codexed.models.thread_item
                  Web search item.
                    ThreadItemImageView
                    codexed.models.thread_item
                    Image view item.
                      ThreadItemEnteredReviewMode
                      codexed.models.thread_item
                      Entered review mode item.
                        ThreadItemExitedReviewMode
                        codexed.models.thread_item
                        Exited review mode item.
                          ThreadItemContextCompaction
                          codexed.models.thread_item
                          Context compaction item.
                            ThreadItemCollabAgentToolCall
                            codexed.models.thread_item
                            Collab agent tool call item.
                              ThreadItemFunctionCallOutput
                              codexed.models.thread_item
                              Output of a function call.
                                ThreadItemHookPrompt
                                codexed.models.thread_item
                                Prompt injected by a hook.
                                  ThreadItemImageGeneration
                                  codexed.models.thread_item
                                  Image generation item.
                                    ThreadItemSleep
                                    codexed.models.thread_item
                                    Sleep item.
                                      ThreadItemSubAgentActivity
                                      codexed.models.thread_item
                                      Activity of a sub-agent.

                                        Base classes

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

                                        ⋔ Inheritance diagram

                                        graph TD
                                          2083311648["thread_item.BaseThreadItem"]
                                          3116041069["base.CodexBaseModel"]
                                          3879467795["main.BaseModel"]
                                          2751680898["builtins.object"]
                                          3116041069 --> 2083311648
                                          3879467795 --> 3116041069
                                          2751680898 --> 3879467795

                                        🛈 DocStrings

                                        Bases: CodexBaseModel

                                        Base class for thread items.

                                        Source code in src/codexed/models/thread_item.py
                                        class BaseThreadItem(CodexBaseModel):
                                            """Base class for thread items."""
                                        
                                            id: str
                                            started_at_ms: int | None = None
                                            """Unix timestamp (in milliseconds) when this item lifecycle started."""
                                            completed_at_ms: int | None = None
                                            """Unix timestamp (in milliseconds) when this item lifecycle completed."""
                                        
                                            @property
                                            def inferred_arguments(self) -> dict[str, Any] | None:
                                                """Best-effort reconstruction of tool-call-like arguments.
                                        
                                                Returns a dict for tool-like items, None for non-tool items.
                                                """
                                                return None
                                        

                                        completed_at_ms class-attribute instance-attribute

                                        completed_at_ms: int | None = None
                                        

                                        Unix timestamp (in milliseconds) when this item lifecycle completed.

                                        inferred_arguments property

                                        inferred_arguments: dict[str, Any] | None
                                        

                                        Best-effort reconstruction of tool-call-like arguments.

                                        Returns a dict for tool-like items, None for non-tool items.

                                        started_at_ms class-attribute instance-attribute

                                        started_at_ms: int | None = None
                                        

                                        Unix timestamp (in milliseconds) when this item lifecycle started.

                                        :fa-brands-github: Show source on GitHub