Return a snapshot of one task’s current state.
SDK clients call this to poll a previously-submitted task for
its status, latest output, or failure reason. The shape is
deliberately flat — detailed step-by-step execution data lives
behind GET /v1/chat/tasks/{task_id}/steps (commit F).
Args:
task_id: Path parameter; the target task’s primary key.
authed: (Agent, AgentApiKey) tuple.
db: SQLAlchemy session.
Returns:
:class:TaskInfoResponse with task_id, agent_id,
status, latest-turn input / output / error,
created_at, and completed_at (set only when the task
has reached a terminal state).
Raises: V1ApiError 401: missing / invalid / revoked key. V1ApiError 404: task missing or not owned by the calling agent.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
GET /v1/chat/tasks/{task_id} response.
Returns a snapshot of the task's current state from the tasks
row. input / output / error reflect the latest turn
only -- full transcript history is queryable via the /steps
endpoint's message type steps.
One of: pending / running / paused / completed / failed.
Latest-turn user input. Null if no message yet recorded.
Latest-turn assistant output. Populated when status reaches 'completed'; null while running or pending.
Last failure reason when status='failed'.
UTC timestamp when the task reached a terminal state (completed or failed). Null while still running.