github mksglu/context-mode v1.0.6

latest releases: v1.0.94, v1.0.93, v1.0.92...
one month ago

Fix: Preserve completed subagent state across compactions

Subagent results were lost during context compaction, causing the model to re-launch already-completed research agents after compact.

What was fixed

Three bugs in the session continuity module:

  1. extractSubagent ignored tool_response — only the prompt was captured, so the model had no record of completion
  2. Missing renderSubagents() function — subagent events were collected but never serialized into the resume snapshot XML
  3. Subagent events not wired into snapshot tiers — completed agents now go to P2 (35% budget), launched agents to P3 (15% budget)

Result

After compaction, the resume snapshot now includes:

<subagents>
  <agent status="completed">[completed] Research Cursor → Found env vars</agent>
  <agent status="completed">[completed] Research Codex → Found CLI flags</agent>
</subagents>

The model sees completed agents and does not re-launch them.

Tests

  • 8 new tests across session-extract.test.ts and session-snapshot.test.ts
  • 713/713 tests passing, 0 failures
  • End-to-end pipeline verified with programmatic verification

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.