diff --git a/packages/webui/tests/triage-host.test.mjs b/packages/webui/tests/triage-host.test.mjs index 345f073c7..56aa6988b 100644 --- a/packages/webui/tests/triage-host.test.mjs +++ b/packages/webui/tests/triage-host.test.mjs @@ -785,6 +785,8 @@ test("cap: the relay writes one line per turn, known or unknown, and a session t spend(dataRoot, 7); // before the turn: the baseline holds it assert.deepEqual(await c.call("usage.begin", { turn: first.id }), {}); spend(dataRoot, 40); + // A repeated begin for the same turn keeps the first baseline, so the tokens before it still count. + assert.deepEqual(await c.call("usage.begin", { turn: first.id }), {}); spend(dataRoot, 2); await c.call("usage.end", { turn: first.id }); // A repeated end does not count the turn twice.