co-mono/packages/coding-agent/test/session-manager
Mario Zechner 2f64df1e52 fix(coding-agent): prevent duplicate session headers when forking from pre-assistant entry
createBranchedSession() wrote the file and set flushed=true even when the
branched path had no assistant message. The next _persist() call saw no
assistant, reset flushed=false, and the subsequent flush appended all
in-memory entries to the already-populated file, duplicating the header
and entries.

Fix: defer file creation when the branched path has no assistant message,
matching the newSession() contract. _persist() creates the file on the
first assistant response.

closes #1672
2026-02-27 22:18:26 +01:00
..
build-context.test.ts refactor(hooks): split session events into individual typed events 2025-12-30 22:42:22 +01:00
file-operations.test.ts Fixes #933 2026-01-25 02:51:05 +01:00
labels.test.ts Add label support for session entries 2025-12-30 22:42:18 +01:00
migration.test.ts Merge hooks and custom-tools into unified extensions system (#454) 2026-01-05 01:43:35 +01:00
save-entry.test.ts Merge hooks and custom-tools into unified extensions system (#454) 2026-01-05 01:43:35 +01:00
tree-traversal.test.ts fix(coding-agent): prevent duplicate session headers when forking from pre-assistant entry 2026-02-27 22:18:26 +01:00