Follow-up from burn#7 (shipped in @relayburn/*@0.8.0).
What to do
A. Wire buildClaudeHookSettings into the two spawn sites
Burn now exports a pure spawner primitive from @relayburn/ledger:
import { buildClaudeHookSettings, stamp } from '@relayburn/ledger';
const { sessionId, settings } = buildClaudeHookSettings();
await stamp({ sessionId }, { workflowId, agentId, persona, tier });
spawn('claude', [
'--session-id', sessionId,
'--settings', settings,
...existingArgs,
]);
Apply the same pattern at both spawn sites:
packages/sdk/src/workflows/process-spawner.ts:68 (non-interactive agent steps)
packages/sdk/src/workflows/runner.ts:5887 (interactive agents via relay.spawnPty)
Relay's existing env-var threading (AGENT_NAME, RELAY_API_KEY, AGENT_CHANNELS at runner.ts:5863-5868) is orthogonal — leave it alone.
B. Retire CostTracker
src/cost/tracker.ts writes a wall-clock-based token estimate to ~/.agent-relay/usage.jsonl. Once (A) is in place, burn's hook-fed ledger at ~/.relayburn/ledger.jsonl is the authoritative source for the same data (exact, not estimated). Delete CostTracker and any call sites.
Acceptance
Follow-up from burn#7 (shipped in
@relayburn/*@0.8.0).What to do
A. Wire
buildClaudeHookSettingsinto the two spawn sitesBurn now exports a pure spawner primitive from
@relayburn/ledger:Apply the same pattern at both spawn sites:
packages/sdk/src/workflows/process-spawner.ts:68(non-interactive agent steps)packages/sdk/src/workflows/runner.ts:5887(interactive agents viarelay.spawnPty)Relay's existing env-var threading (
AGENT_NAME,RELAY_API_KEY,AGENT_CHANNELSatrunner.ts:5863-5868) is orthogonal — leave it alone.B. Retire
CostTrackersrc/cost/tracker.tswrites a wall-clock-based token estimate to~/.agent-relay/usage.jsonl. Once (A) is in place, burn's hook-fed ledger at~/.relayburn/ledger.jsonlis the authoritative source for the same data (exact, not estimated). DeleteCostTrackerand any call sites.Acceptance
--session-id+--settingswhen spawningclaude.CostTrackerand~/.agent-relay/usage.jsonlare removed; any UI that reads the old file now reads from burn.TurnRecordwith the stamped enrichment shows up inburn query --session <id>.