Public Beta. This content is updated as features change.
Sessions
A session is one piece of work by an AI agent. Harnessforce rolls up token counts, cost, and API and tool failures for each session.
/plugin marketplace add lambda-script/harnessforce-agent
/plugin install harnessforce@harnessforce-agent
/harnessforce:setupA session is one piece of work by an AI agent. Harnessforce rolls up token counts, cost, API calls, tool calls, and their failures from the session's telemetry. On an issue, the sessions linked to it appear under "Sessions."
What counts as a session
A session's ID (session_id) is a UUID v5 derived from the workspace, the agent type, and the session ID. Whether telemetry, a plugin hook, the MCP server, or harnessforce import registers a session, Harnessforce treats it as the same session.
- Sessions are built from Claude Code telemetry that carries a session ID. Telemetry without a session ID is still stored, but it isn't grouped into a session.
- If the session ID in the telemetry differs from the one the hook received, Harnessforce still joins them into one session when the first prompt ID matches.
- Sessions are assembled from log events and metrics. Claude Code traces are in beta, so they're added as span detail when they arrive.
What a session contains
| Field | Meaning |
|---|---|
| Model | The model used in the last API request |
| Start and end | The times of the first and last records in the session |
| Token counts | Totals for input, output, cache read, and cache write |
| Cost | The cost the agent reported. If the agent didn't report one, Harnessforce estimates it from per-model prices and token counts, and marks it as estimated |
| API requests and API errors | The number of API requests and errors in the session |
| Tool calls and tool failures | The number of tool results and how many of them failed |
| Active time | The total of Claude Code's active time, in seconds |
| Repository and branch | The repository and branch when the session started |
Values Harnessforce couldn't collect stay empty instead of showing 0. For example, if no API request events arrived for a session, its token counts are empty, not zero. If a session used a model that isn't in the price table, its cost stays empty instead of being estimated. Claude Haiku 5.5 is priced by the prompt length of each request, which a session's totals don't tell, so a session that used it also has an empty cost unless the agent reported one. A trace estimates each request at the price for its own prompt length.
Session status
A session's status is worked out from the time of its last record when you view it.
| Status | Condition |
|---|---|
| Running | The last record is within the last 30 minutes |
| Completed | More than 30 minutes have passed, and the last API event wasn't an error |
| Ended with error | More than 30 minutes have passed, and the last API event was an error |
Imported sessions
Past sessions you bring in with harnessforce import are sessions too. Until telemetry for the same session arrives, they're labeled "Imported." Once telemetry arrives, the values built from telemetry take precedence and the session counts as a single session.
An imported session has the model, input and output token counts, and tool calls and failures. Its cost is estimated from the price table (a Claude Haiku 5.5 session's cost is empty). Cache read, cache write, API requests, API errors, and active time are empty. Imported sessions don't affect which developer seats are assigned.
Reading sessions through the Read API
Use GET /api/v1/sessions to read sessions. Filtering by issue identifier returns only sessions with a confirmed link to that issue.
For the returned fields and authentication, see Read API.
Read next
- Linking sessions to issues: How sessions link to issues
- Fidelity: Empty values and the "Not measured" label