From 6efc09b7eb609fdb85e7855eb05313e042d4d1fb Mon Sep 17 00:00:00 2001 From: Vegard Stikbakke Date: Mon, 6 Jul 2026 15:31:32 +0200 Subject: [PATCH] fix(coding-agent): clear label timestamp cache on new sessions closes #6354 --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/core/session-manager.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 782211972..f5f3d1fd2 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -17,6 +17,7 @@ - Fixed custom session entries appended during assistant streaming to render before the live assistant message, matching persisted session order. - Fixed oversized bash tool timeouts to fail with a clear validation error instead of being clamped to an immediate timeout ([#6181](https://github.com/earendil-works/pi/issues/6181)). - Fixed the edit tool schema to allow model-invented extra replacement fields instead of rejecting otherwise valid edits ([#6278](https://github.com/earendil-works/pi/issues/6278)). +- Fixed new session resets to clear cached label timestamps ([#6354](https://github.com/earendil-works/pi/issues/6354)). ### Removed diff --git a/packages/coding-agent/src/core/session-manager.ts b/packages/coding-agent/src/core/session-manager.ts index e6db87ad1..f5039870a 100644 --- a/packages/coding-agent/src/core/session-manager.ts +++ b/packages/coding-agent/src/core/session-manager.ts @@ -864,6 +864,7 @@ export class SessionManager { this.fileEntries = [header]; this.byId.clear(); this.labelsById.clear(); + this.labelTimestampsById.clear(); this.leafId = null; this.flushed = false;