Impact
If transcript updates traverse or materialize full session history on each write, tool-heavy sessions can incur cumulative O(n²) work: slow saves, memory spikes, and disk churn.
Actual behavior
A low-cost probe reported likely full-history traversal/materialization/write amplification around tool-heavy sessions. This is consistent with large local AgentSession JSON and rollout footprints, but needs measurement before storage redesign.
Expected behavior
- First deliverable: instrument and confirm or refute full-history write amplification.
- If confirmed, session persistence should be incremental, append-oriented, or dirty-segment based rather than full-document rewrite per update.
- Existing on-disk compatibility should be preserved or migrated deliberately.
Publishable evidence
- Probe finding: likely full-history traversal/materialization/write amplification.
- Local scan: about 2,075 AgentSession JSON files totaling about 64 MB.
Scope / non-goals
In scope:
- measurement/instrumentation,
- persistence strategy for AgentSession updates if confirmed.
Out of scope:
Likely affected areas
Sources/RepoPrompt/Features/AgentMode/Runtime/Transcript/
Sources/RepoPrompt/Infrastructure/Persistence/
Tests/RepoPromptTests/AgentMode/Transcript/
Tests/RepoPromptTests/Persistence/
Acceptance criteria
Interlinks
Part of #406. Related: #403.
Impact
If transcript updates traverse or materialize full session history on each write, tool-heavy sessions can incur cumulative O(n²) work: slow saves, memory spikes, and disk churn.
Actual behavior
A low-cost probe reported likely full-history traversal/materialization/write amplification around tool-heavy sessions. This is consistent with large local AgentSession JSON and rollout footprints, but needs measurement before storage redesign.
Expected behavior
Publishable evidence
Scope / non-goals
In scope:
Out of scope:
session_metadedup, tracked in Rolloutsession_metaduplicated across many session records #403,Likely affected areas
Sources/RepoPrompt/Features/AgentMode/Runtime/Transcript/Sources/RepoPrompt/Infrastructure/Persistence/Tests/RepoPromptTests/AgentMode/Transcript/Tests/RepoPromptTests/Persistence/Acceptance criteria
Interlinks
Part of #406. Related: #403.