altimate-code icon indicating copy to clipboard operation
altimate-code copied to clipboard

fix: route compaction-summary lastUser.agent writes through normalizeAgentName

Open anandgupta42 opened this issue 6 months ago • 0 comments

Summary: v0.7.3 normalizes agent: "build" → "builder" at telemetry-emit boundary (PR #833). The fix is complete for emits, but three sites in session/prompt.ts still write lastUser.agent raw into persisted-state synthetic messages:

  • L615 — compaction summary user message
  • L654 — SessionCompaction.create
  • L1092 — SessionCompaction.create (second call site)

Persisted state therefore continues to record "build" for legacy-name calls; only telemetry is clean.

Recommended fix: Route those three sites through normalizeAgentName, OR add a one-shot migration on session load that rewrites "build" → "builder" in any historical row.

Acceptance: No new "build" rows enter persisted state on any code path; backfill optional.

Origin: Deferred from v0.7.3 release review (Tech Lead, P1).

anandgupta42 avatar May 24 '26 03:05 anandgupta42