v1.0.1 — Session Task State Fix
Bug Fix
Completed tasks no longer resurface after context compaction.
When context compacted, the session guide was including already-completed tasks — causing the model to re-suggest finished work. Three layers were fixed:
snapshot.tsrenderTaskState()— Now reconstructs the full task list from create/update events, filters completed tasks, and returns empty when all tasks are done. Previously only showed the last raw event.session-directive.mjsbuildSessionDirective()— Filters completed tasks from the session guide. Section renamed from## Tasksto## Pending Tasks. No section emitted if all tasks are complete.session-directive.mjswriteSessionEventsFile()— Splits tasks into## Tasks In Progressand## Tasks Completedsections for accurate FTS5 indexing. Previously labeled all tasks as "In Progress" regardless of status.
Tests
tests/snapshot-task-state.test.ts— 8 new tests forrenderTaskState()completion filteringtests/session-directive-tasks.test.ts— 7 new tests for directive and events file task splitting- Updated 3 existing tests in
tests/session/session-snapshot.test.tsto use structured task event format
34 test files, 705 tests — all green.
Install
# Claude Code (plugin marketplace)
/install context-mode
# Other platforms (global install)
npm install -g context-mode