Files
magpie/internal/sessions/testdata/devin/cli/sessions.sql
T
yetone e630c003cd usage: Devin CLI's own calls are read from its sessions (aohan0905 on X)
Usage counted none of Devin CLI's requests. Devin's CLI (3000.11.234,
run for real in a sandbox HOME) keeps its sessions in
<data>/devin/cli: sessions.db (SQLite: sessions, and message_nodes with
each chat_message), or with DEVIN_SESSION_STORE=files a folder per
session (log.jsonl + meta.json), whose first run copies the database's
sessions in and leaves the database. Each assistant message names its
call: request_id, generation_model (swe-2-high, effort and all),
created_at and metrics (input/output/cache read/cache write tokens,
ttft_ms, total_time_ms), written as two nodes per reply.

- sessions: calls_devin.go lists both stores (a session in both once,
  from the store written last), reads each session whole, one call per
  request_id (Msg devin:<id>), with the cwd. Registered in callSources
  and wholeCallReaders; Found lists "devin" for the consent page.
- provider: DevinModelEffort splits a variant id into model and effort
  (claude-haiku-5-5-low -> claude-haiku-5-5, low), so the catalog prices
  it. swe-2 has no catalog price and shows as unpriced.
- agentenv clears DEVIN_SESSIONS_DIR in test sandboxes.

Fixtures are the real runs' files: 3 sessions in sessions.sql (schema
verbatim, triggers dropped, assistant and user rows only), one session
only in the folder store and one in both, project folder renamed.

Run (mica): go test ./internal/sessions ./internal/provider
./internal/agentenv ./internal/usage ./internal/usageapi ./internal/cli
./internal/gui ok; go vet darwin, linux -tags nogui, windows on the
touched packages ok; gofmt clean. win-run: the Devin tests ok. A built
binary's `magpie usage all` / `--csv all` in a sandbox HOME holding the
real Devin data: 5 calls under Devin, the two claude-haiku-5-5 calls
priced from the catalog ($0.000277, $0.000986), swe-2 unpriced.

Broken by hand: devinCallFiles out of callSources (TestDevinCalls and
TestDevinDBReadAgain red, 0 calls); a session in both stores listed
twice (TestDevinSessionListedOnce red, 9 calls); the per-request dedupe
off (red, a request counted twice); DevinModelEffort returning the id
whole (TestDevinCalls and TestDevinModelEffort red).

Not tried: Devin's folder on Windows (taken as %APPDATA%\devin\cli, as
its credentials.toml; not seen on a real Windows install); a long real
session or subagents; DEVIN_SESSIONS_DIR set (read from the CLI's
behaviour in the sandbox, not from a GUI-started magpie's environment).
2026-11-13 12:26:43 +08:00

44 lines
29 KiB
SQL

CREATE TABLE sessions (
id TEXT PRIMARY KEY,
working_directory TEXT NOT NULL,
backend_type TEXT NOT NULL,
model TEXT NOT NULL,
agent_mode TEXT NOT NULL,
created_at INTEGER NOT NULL,
last_activity_at INTEGER NOT NULL, title TEXT, main_chain_id INTEGER, shell_last_seen_index INTEGER DEFAULT 0, cogs_json TEXT, workspace_dirs TEXT, hidden INTEGER NOT NULL DEFAULT 0, metadata TEXT);
CREATE TABLE message_nodes (
row_id INTEGER PRIMARY KEY AUTOINCREMENT,
session_id TEXT NOT NULL,
node_id INTEGER NOT NULL, -- node_id within this session's forest
parent_node_id INTEGER, -- NULL for root nodes
chat_message TEXT NOT NULL,
created_at INTEGER NOT NULL, metadata TEXT,
FOREIGN KEY (session_id) REFERENCES sessions(id),
UNIQUE(session_id, node_id)
);
INSERT INTO sessions (id, working_directory, backend_type, model, agent_mode, created_at, last_activity_at, title, main_chain_id) VALUES ('plucky-switch','/work/proj','windsurf','swe-2-high','normal',1794542957,1794542959,'Reply with just the word hi',26);
INSERT INTO sessions (id, working_directory, backend_type, model, agent_mode, created_at, last_activity_at, title, main_chain_id) VALUES ('poised-trust','/work/proj','windsurf','swe-2-high','normal',1794542979,1794542982,'Read note.txt and tell me its second word',29);
INSERT INTO sessions (id, working_directory, backend_type, model, agent_mode, created_at, last_activity_at, title, main_chain_id) VALUES ('chrome-radish','/work/proj','windsurf','claude-haiku-5-5-low','normal',1794543003,1794543006,'Read note.txt and tell me its first word',26);
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (2,'plucky-switch',1,0,'{"message_id":"f768cc86-1668-42f5-9fa7-2229accd41ec","role":"user","content":"Reply with just the word hi","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:17.899462Z","from_event_id":"b97d2547-6a79-4ceb-88bb-629d88b6d066","telemetry":{"source":"user","operation":"unknown"}}}',1794542957,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (9,'plucky-switch',8,7,'{"message_id":"f768cc86-1668-42f5-9fa7-2229accd41ec","role":"user","content":"Reply with just the word hi","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:17.899462Z","from_event_id":"b97d2547-6a79-4ceb-88bb-629d88b6d066","telemetry":{"source":"user","operation":"unknown"}}}',1794542957,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (16,'plucky-switch',15,14,'{"message_id":"f768cc86-1668-42f5-9fa7-2229accd41ec","role":"user","content":"Reply with just the word hi","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:17.899462Z","from_event_id":"b97d2547-6a79-4ceb-88bb-629d88b6d066","telemetry":{"source":"user","operation":"unknown"}}}',1794542957,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (24,'plucky-switch',23,22,'{"message_id":"f768cc86-1668-42f5-9fa7-2229accd41ec","role":"user","content":"Reply with just the word hi","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:17.899462Z","from_event_id":"b97d2547-6a79-4ceb-88bb-629d88b6d066","telemetry":{"source":"user","operation":"unknown"}}}',1794542957,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (26,'plucky-switch',25,24,'{"message_id":"e7b64a43-3960-4bd6-aac5-7c93a36036cb","role":"assistant","content":"hi","tool_calls":[],"thinking":{"thinking":"The user wants only the word \"hi\" as the response. I don''t need to use any tools for this; the final output should be just \"hi\" with no extra characters or formatting.","signature":"sealed.v1.qxYXeJznleICPxog2wupqnEfATYG0uNjzUDcMPCr1h-PknvcCApss8FO_AboR_RYIGQ8tKkQLQJsw8r440sgJqW1khlijhAEyFQONi1OwdLnCkSD9DvMeEWKES_yK5LAyFjTYGLU1k0BY5EwgO50SBnKgW1laMRzckPo__xGdiXmOb351QkvdiSmPdSLwq9oRQ","signature_type":"sealed"},"metadata":{"num_tokens":44,"is_user_input":null,"request_id":"d07541eb-60f2-46b4-97b4-eb53c04f19a8","metrics":{"ttft_ms":1800,"total_time_ms":1812,"input_tokens":2143,"output_tokens":44,"cache_read_tokens":10112,"cache_creation_tokens":null,"context_input_tokens":12255,"tpot_ms":0.2727272727272727,"tokens_per_sec":3666.6666666666665},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":2143.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":44.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":10112.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:18.743140Z","created_at":"2026-11-13T04:09:19.715449Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542959,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (27,'plucky-switch',26,24,'{"message_id":"e7b64a43-3960-4bd6-aac5-7c93a36036cb","role":"assistant","content":"hi","tool_calls":[],"thinking":{"thinking":"The user wants only the word \"hi\" as the response. I don''t need to use any tools for this; the final output should be just \"hi\" with no extra characters or formatting.","signature":"sealed.v1.qxYXeJznleICPxog2wupqnEfATYG0uNjzUDcMPCr1h-PknvcCApss8FO_AboR_RYIGQ8tKkQLQJsw8r440sgJqW1khlijhAEyFQONi1OwdLnCkSD9DvMeEWKES_yK5LAyFjTYGLU1k0BY5EwgO50SBnKgW1laMRzckPo__xGdiXmOb351QkvdiSmPdSLwq9oRQ","signature_type":"sealed"},"metadata":{"num_tokens":44,"is_user_input":null,"request_id":"d07541eb-60f2-46b4-97b4-eb53c04f19a8","metrics":{"ttft_ms":1800,"total_time_ms":1812,"input_tokens":2143,"output_tokens":44,"cache_read_tokens":10112,"cache_creation_tokens":null,"context_input_tokens":12255,"tpot_ms":0.2727272727272727,"tokens_per_sec":3666.6666666666665},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":2143.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":44.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":10112.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:18.743140Z","created_at":"2026-11-13T04:09:19.715449Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542959,'{"summarized_from":null,"num_tokens_preceding":12255,"is_system_prefix":null}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (29,'poised-trust',1,0,'{"message_id":"d0fe55ba-0264-4576-af39-d57cf215f063","role":"user","content":"Read note.txt and tell me its second word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:39.862478Z","from_event_id":"8a0d3c76-857e-4f29-84c8-70c98a8611c2","telemetry":{"source":"user","operation":"unknown"}}}',1794542979,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (36,'poised-trust',8,7,'{"message_id":"d0fe55ba-0264-4576-af39-d57cf215f063","role":"user","content":"Read note.txt and tell me its second word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:39.862478Z","from_event_id":"8a0d3c76-857e-4f29-84c8-70c98a8611c2","telemetry":{"source":"user","operation":"unknown"}}}',1794542979,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (43,'poised-trust',15,14,'{"message_id":"d0fe55ba-0264-4576-af39-d57cf215f063","role":"user","content":"Read note.txt and tell me its second word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:39.862478Z","from_event_id":"8a0d3c76-857e-4f29-84c8-70c98a8611c2","telemetry":{"source":"user","operation":"unknown"}}}',1794542979,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (51,'poised-trust',23,22,'{"message_id":"d0fe55ba-0264-4576-af39-d57cf215f063","role":"user","content":"Read note.txt and tell me its second word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:09:39.862478Z","from_event_id":"8a0d3c76-857e-4f29-84c8-70c98a8611c2","telemetry":{"source":"user","operation":"unknown"}}}',1794542979,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (53,'poised-trust',25,24,'{"message_id":"0ca71b5d-f379-4dd2-84e1-6e04ea0b029f","role":"assistant","content":"","tool_calls":[{"id":"exec:0#9d7059ac4a274f03ae83d01a2b0dcbf3","name":"exec","arguments":{"command":"cat note.txt"},"index":0,"kind":"function"}],"thinking":{"thinking":"I need to read the file `note.txt` and extract the second word. This seems straightforward.","signature":"sealed.v1.FvqvfHf8N0AtViQ4AsM8_KxOh1nW4TROTHdKHe06MARzlkh6Sg8mTjUlQ4XaJiwVzoB37ZLYTlP0lbsxmA5xrhPyl2xHsw82nVAHz7o2hcFCuJp5FYO8oGHZuCPVjcei1IkW-jZHhxHIww","signature_type":"sealed"},"metadata":{"num_tokens":68,"is_user_input":null,"request_id":"29bc2ea6-ee76-4e5d-95c1-ce2be7d94327","metrics":{"ttft_ms":1491,"total_time_ms":1493,"input_tokens":10914,"output_tokens":68,"cache_read_tokens":1344,"cache_creation_tokens":null,"context_input_tokens":12258,"tpot_ms":0.029411764705882353,"tokens_per_sec":34000.0},"finish_reason":"tool_calls","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":10914.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":68.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":1344.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:40.861627Z","created_at":"2026-11-13T04:09:41.356999Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542981,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (54,'poised-trust',26,24,'{"message_id":"0ca71b5d-f379-4dd2-84e1-6e04ea0b029f","role":"assistant","content":"","tool_calls":[{"id":"exec:0#9d7059ac4a274f03ae83d01a2b0dcbf3","name":"exec","arguments":{"command":"cat note.txt"},"index":0,"kind":"function"}],"thinking":{"thinking":"I need to read the file `note.txt` and extract the second word. This seems straightforward.","signature":"sealed.v1.FvqvfHf8N0AtViQ4AsM8_KxOh1nW4TROTHdKHe06MARzlkh6Sg8mTjUlQ4XaJiwVzoB37ZLYTlP0lbsxmA5xrhPyl2xHsw82nVAHz7o2hcFCuJp5FYO8oGHZuCPVjcei1IkW-jZHhxHIww","signature_type":"sealed"},"metadata":{"num_tokens":68,"is_user_input":null,"request_id":"29bc2ea6-ee76-4e5d-95c1-ce2be7d94327","metrics":{"ttft_ms":1491,"total_time_ms":1493,"input_tokens":10914,"output_tokens":68,"cache_read_tokens":1344,"cache_creation_tokens":null,"context_input_tokens":12258,"tpot_ms":0.029411764705882353,"tokens_per_sec":34000.0},"finish_reason":"tool_calls","extensions":{"chisel/tool_call_content":{"exec:0#9d7059ac4a274f03ae83d01a2b0dcbf3":{"toolCallId":"exec:0#9d7059ac4a274f03ae83d01a2b0dcbf3","title":"Read ./note.txt","status":"pending","content":[{"type":"content","content":{"type":"resource","resource":{"mimeType":"text/x-shellscript","text":"cat note.txt","uri":"tool://preview"},"_meta":{"cognition.ai/preview_is_shell_command":true}}}],"kind":"execute","rawInput":{"command":"cat note.txt"},"_meta":{"cognition.ai/commandNames":["cat"]}}}},"response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":10914.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":68.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":1344.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:40.861627Z","created_at":"2026-11-13T04:09:41.356999Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542981,'{"summarized_from":null,"num_tokens_preceding":12258,"is_system_prefix":null}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (56,'poised-trust',28,27,'{"message_id":"c08197ef-a72a-46d6-810f-989c5cb09b28","role":"assistant","content":"The second word is **beta** (the file contains `alpha beta`).","tool_calls":[],"thinking":{"thinking":"The file contains \"alpha beta.\" I see the second word is \"beta.\"","signature":"sealed.v1.n8rlUuTDJDHc9ld-tVlcFLMtlOs9XLLhn7Zp3WdSJg5Ld7zTY2Uyj13wrC8PX8yn2cRvwjwRem9FFqhTzUyPnMsmZy4Qmcsagzdl_mr8ASMusXZDZxk","signature_type":"sealed"},"metadata":{"num_tokens":42,"is_user_input":null,"request_id":"cda0f093-57c7-4c4a-b73e-8f55035b52b7","metrics":{"ttft_ms":1504,"total_time_ms":1556,"input_tokens":2261,"output_tokens":42,"cache_read_tokens":10112,"cache_creation_tokens":null,"context_input_tokens":12373,"tpot_ms":1.2380952380952381,"tokens_per_sec":807.6923076923077},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":2261.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":42.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":10112.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:42.477929Z","created_at":"2026-11-13T04:09:42.942772Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542982,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (57,'poised-trust',29,27,'{"message_id":"c08197ef-a72a-46d6-810f-989c5cb09b28","role":"assistant","content":"The second word is **beta** (the file contains `alpha beta`).","tool_calls":[],"thinking":{"thinking":"The file contains \"alpha beta.\" I see the second word is \"beta.\"","signature":"sealed.v1.n8rlUuTDJDHc9ld-tVlcFLMtlOs9XLLhn7Zp3WdSJg5Ld7zTY2Uyj13wrC8PX8yn2cRvwjwRem9FFqhTzUyPnMsmZy4Qmcsagzdl_mr8ASMusXZDZxk","signature_type":"sealed"},"metadata":{"num_tokens":42,"is_user_input":null,"request_id":"cda0f093-57c7-4c4a-b73e-8f55035b52b7","metrics":{"ttft_ms":1504,"total_time_ms":1556,"input_tokens":2261,"output_tokens":42,"cache_read_tokens":10112,"cache_creation_tokens":null,"context_input_tokens":12373,"tpot_ms":1.2380952380952381,"tokens_per_sec":807.6923076923077},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"SWE-2 High"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":2261.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":42.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":10112.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:09:42.477929Z","created_at":"2026-11-13T04:09:42.942772Z","generation_model":"swe-2-high","telemetry":{"source":"assistant","operation":"inference"}}}',1794542982,'{"summarized_from":null,"num_tokens_preceding":12373,"is_system_prefix":null}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (59,'chrome-radish',1,0,'{"message_id":"1a52597f-2203-4e0b-9ddc-ffa0577d729c","role":"user","content":"Read note.txt and tell me its first word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:10:03.750917Z","from_event_id":"c43465ce-b075-4e26-9158-53a5c7aee02f","telemetry":{"source":"user","operation":"unknown"}}}',1794543003,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (65,'chrome-radish',7,6,'{"message_id":"1a52597f-2203-4e0b-9ddc-ffa0577d729c","role":"user","content":"Read note.txt and tell me its first word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:10:03.750917Z","from_event_id":"c43465ce-b075-4e26-9158-53a5c7aee02f","telemetry":{"source":"user","operation":"unknown"}}}',1794543003,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (71,'chrome-radish',13,12,'{"message_id":"1a52597f-2203-4e0b-9ddc-ffa0577d729c","role":"user","content":"Read note.txt and tell me its first word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:10:03.750917Z","from_event_id":"c43465ce-b075-4e26-9158-53a5c7aee02f","telemetry":{"source":"user","operation":"unknown"}}}',1794543003,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (78,'chrome-radish',20,19,'{"message_id":"1a52597f-2203-4e0b-9ddc-ffa0577d729c","role":"user","content":"Read note.txt and tell me its first word","metadata":{"num_tokens":null,"is_user_input":true,"request_id":null,"metrics":null,"finish_reason":null,"created_at":"2026-11-13T04:10:03.750917Z","from_event_id":"c43465ce-b075-4e26-9158-53a5c7aee02f","telemetry":{"source":"user","operation":"unknown"}}}',1794543003,'{"summarized_from":null,"num_tokens_preceding":null,"is_system_prefix":null,"extensions":{"compact/prior_node_ids":[1]}}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (80,'chrome-radish',22,21,'{"message_id":"4f3edf09-a09a-4551-9552-b1c96e07fd90","role":"assistant","content":"","tool_calls":[{"id":"toolu_01DixosYcMUiMMxFWEu8hYi7","name":"read","arguments":{"file_path":"/work/proj/note.txt"},"index":0,"kind":"function"}],"metadata":{"num_tokens":85,"is_user_input":null,"request_id":"7f0d1818-1993-4c66-9fec-d5c5f292062a","metrics":{"ttft_ms":null,"total_time_ms":1548,"input_tokens":467,"output_tokens":85,"cache_read_tokens":12633,"cache_creation_tokens":6163,"context_input_tokens":19263,"tpot_ms":18.211764705882352,"tokens_per_sec":54.90956072351421},"finish_reason":"tool_calls","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"Claude Haiku 5.5 Low"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":6630.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":85.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":12633.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:10:05.099483Z","created_at":"2026-11-13T04:10:05.299749Z","generation_model":"claude-haiku-5-5-low","telemetry":{"source":"assistant","operation":"inference"}}}',1794543005,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (81,'chrome-radish',23,21,'{"message_id":"4f3edf09-a09a-4551-9552-b1c96e07fd90","role":"assistant","content":"","tool_calls":[{"id":"toolu_01DixosYcMUiMMxFWEu8hYi7","name":"read","arguments":{"file_path":"/work/proj/note.txt"},"index":0,"kind":"function"}],"metadata":{"num_tokens":85,"is_user_input":null,"request_id":"7f0d1818-1993-4c66-9fec-d5c5f292062a","metrics":{"ttft_ms":null,"total_time_ms":1548,"input_tokens":467,"output_tokens":85,"cache_read_tokens":12633,"cache_creation_tokens":6163,"context_input_tokens":19263,"tpot_ms":18.211764705882352,"tokens_per_sec":54.90956072351421},"finish_reason":"tool_calls","extensions":{"chisel/tool_call_content":{"toolu_01DixosYcMUiMMxFWEu8hYi7":{"toolCallId":"toolu_01DixosYcMUiMMxFWEu8hYi7","title":"Read file","status":"pending","locations":[{"path":"/work/proj/note.txt"}],"kind":"read","rawInput":{"file_path":"/work/proj/note.txt"}}}},"response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"Claude Haiku 5.5 Low"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":6630.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":85.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":12633.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:10:05.099483Z","created_at":"2026-11-13T04:10:05.299749Z","generation_model":"claude-haiku-5-5-low","telemetry":{"source":"assistant","operation":"inference"}}}',1794543005,'{"summarized_from":null,"num_tokens_preceding":19263,"is_system_prefix":null}');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (83,'chrome-radish',25,24,'{"message_id":"4623b508-3b38-4033-9d1a-23113fb2bf62","role":"assistant","content":"The first word in `note.txt` is **alpha**.","tool_calls":[],"metadata":{"num_tokens":19,"is_user_input":null,"request_id":"03288c50-2fbc-412f-8930-e8e6f0ebcc0e","metrics":{"ttft_ms":1171,"total_time_ms":1210,"input_tokens":2,"output_tokens":19,"cache_read_tokens":18796,"cache_creation_tokens":635,"context_input_tokens":19433,"tpot_ms":2.0526315789473686,"tokens_per_sec":487.1794871794872},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"Claude Haiku 5.5 Low"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":637.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":19.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":18796.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:10:06.483156Z","created_at":"2026-11-13T04:10:06.522177Z","generation_model":"claude-haiku-5-5-low","telemetry":{"source":"assistant","operation":"inference"}}}',1794543006,'null');
INSERT INTO message_nodes (row_id, session_id, node_id, parent_node_id, chat_message, created_at, metadata) VALUES (84,'chrome-radish',26,24,'{"message_id":"4623b508-3b38-4033-9d1a-23113fb2bf62","role":"assistant","content":"The first word in `note.txt` is **alpha**.","tool_calls":[],"metadata":{"num_tokens":19,"is_user_input":null,"request_id":"03288c50-2fbc-412f-8930-e8e6f0ebcc0e","metrics":{"ttft_ms":1171,"total_time_ms":1210,"input_tokens":2,"output_tokens":19,"cache_read_tokens":18796,"cache_creation_tokens":635,"context_input_tokens":19433,"tpot_ms":2.0526315789473686,"tokens_per_sec":487.1794871794872},"finish_reason":"stop","response_dimensions":[{"uid":"agent_messages","group_title":"Response Statistics","kind":{"CumulativeMetric":{"label":"Agent messages","value":1.0,"tail":" message","plural_tail":" messages","prefix":""}}},{"uid":"model","group_title":"Response Statistics","kind":{"Metric":{"label":"Model","value":"Claude Haiku 5.5 Low"}}},{"uid":"input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Input tokens","value":637.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"output_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Output tokens","value":19.0,"tail":" token","plural_tail":" tokens","prefix":""}}},{"uid":"cached_input_tokens","group_title":"Token Usage","kind":{"CumulativeMetric":{"label":"Cached input tokens","value":18796.0,"tail":" token","plural_tail":" tokens","prefix":""}}}],"started_generation_at":"2026-11-13T04:10:06.483156Z","created_at":"2026-11-13T04:10:06.522177Z","generation_model":"claude-haiku-5-5-low","telemetry":{"source":"assistant","operation":"inference"}}}',1794543006,'{"summarized_from":null,"num_tokens_preceding":19433,"is_system_prefix":null}');