nexo_session_log_close
Closes an automation run session, recording duration, token usage, cost, and error status. Finalizes the log entry for a completed task.
Instructions
Close an automation_runs row opened by nexo_session_log_create.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | id returned by the create call. | |
| returncode | No | child exit code (0 = ok). | |
| duration_ms | No | wall-clock duration in milliseconds. | |
| input_tokens | No | ||
| cached_input_tokens | No | ||
| output_tokens | No | ||
| total_cost_usd | No | cost in USD as a string (parsed to float). | |
| telemetry_source | No | short label identifying where the counts came from ("desktop_stream", "codex_json", ...). | |
| cost_source | No | short label for cost provenance. | |
| error | No | short error message if the session failed. |