Skip to content

CommandExecutionThreadItem

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: CodexBaseModel

A thread item and its recorded lifecycle times. The payload stays flat on the wire.

Source code in src/codexed/models/v2_protocol.py
class CommandExecutionThreadItem(CodexBaseModel):
    """A thread item and its recorded lifecycle times. The payload stays flat on the wire."""

    completed_at_ms: int | None = None
    """
    Unix timestamp in milliseconds when the item completed, if recorded.
    """
    started_at_ms: int | None = None
    """
    Unix timestamp in milliseconds when the item started, if recorded.
    """
    aggregated_output: str | None = None
    """
    The command's output, aggregated from stdout and stderr.
    """
    command: str
    """
    The command to be executed.
    """
    command_actions: list[CommandAction]
    """
    A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.
    """
    cwd: LegacyAppPathString
    """
    The command's working directory.
    """
    duration_ms: int | None = None
    """
    The duration of the command execution in milliseconds.
    """
    exit_code: int | None = None
    """
    The command's exit code.
    """
    id: str
    plugin_id: str | None = None
    """
    Trusted first-party plugin id when this command resolves to one plugin script.
    """
    process_id: str | None = None
    """
    Identifier for the underlying PTY process (when available).
    """
    script_path: str | None = None
    """
    Safe plugin-relative path when this command resolves to one plugin script.
    """
    source: CommandExecutionSource | None = "agent"
    status: CommandExecutionStatus
    type: Literal["commandExecution"] = "commandExecution"

aggregated_output class-attribute instance-attribute

aggregated_output: str | None = None

The command's output, aggregated from stdout and stderr.

command instance-attribute

command: str

The command to be executed.

command_actions instance-attribute

command_actions: list[CommandAction]

A best-effort parsing of the command to understand the action(s) it will perform. This returns a list of CommandAction objects because a single shell command may be composed of many commands piped together.

completed_at_ms class-attribute instance-attribute

completed_at_ms: int | None = None

Unix timestamp in milliseconds when the item completed, if recorded.

cwd instance-attribute

cwd: LegacyAppPathString

The command's working directory.

duration_ms class-attribute instance-attribute

duration_ms: int | None = None

The duration of the command execution in milliseconds.

exit_code class-attribute instance-attribute

exit_code: int | None = None

The command's exit code.

plugin_id class-attribute instance-attribute

plugin_id: str | None = None

Trusted first-party plugin id when this command resolves to one plugin script.

process_id class-attribute instance-attribute

process_id: str | None = None

Identifier for the underlying PTY process (when available).

script_path class-attribute instance-attribute

script_path: str | None = None

Safe plugin-relative path when this command resolves to one plugin script.

started_at_ms class-attribute instance-attribute

started_at_ms: int | None = None

Unix timestamp in milliseconds when the item started, if recorded.

:fa-brands-github: Show source on GitHub