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

Open Beginner friendly
#842 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript
Domain
tooling

Research direction

Open session/prompt.ts and inspect the three lastUser.agent call sites at lines 615, 654, and 1092, along with the existing normalizeAgentName helper. Route each persisted-state synthetic-message path through that normalization, then verify that no new persisted-state row records the legacy "build" name; historical backfill is optional.

Written by the indexing model from the issue text.

Description

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).

Dominant language
TypeScript
Stars
813
Forks
134
Avg merge
2d 5h
Merged PRs (30d)
62

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from AltimateAI/altimate-code

All issues in AltimateAI/altimate-code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.