Skip to content

feat(coding-agent): renumber visible context blocks - #320

Merged
Pepps233 merged 3 commits into
feat/compact-complete-contextfrom
feat/renumber-context-blocks
Nov 7, 2026
Merged

Pepps233 merged 3 commits into
feat/compact-complete-contextfrom
feat/renumber-context-blocks

Conversation

@Pepps233

@Pepps233 Pepps233 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renumber visible context block selectors in context order after compaction.

Reasoning

Sequential visible selectors make the current context order explicit after blocks are replaced.
Stable internal identities and compacted archive IDs preserve recall and persisted provenance.

Changes

  • Project sequential visible b... IDs while retaining stable internal block identities.
  • Keep compacted ctx-... archive IDs unchanged.
  • Tell the agent to use current block headers because IDs in past tool calls are stale.
  • Apply the same receipt during successful compaction, idempotent retry, and crash replay.
  • Verify nested archive recall after compaction, session reload, and branch forks.
  • Preserve historical tool arguments and the unchanged prefix before the compacted span.

Testing

  • npm run check passed before this commit and again on the rebased stack.
  • All 35 goal test files passed on the rebased stack: 207 tests, using node ../../node_modules/vitest/dist/cli.js --run test/suite/goal-*.test.ts test/suite/agent-session-goal*.test.ts test/suite/pocket-context-projection.test.ts from packages/coding-agent.
  • Targeted goal suites cover consecutive compactions, sequential headers, native-message preservation, crash replay, and actual recall tool execution.
  • Reproduced out-of-order visible IDs before changing the implementation.

- Present selectors in context order while preserving stored identities and archive IDs.
- Warn about stale tool arguments and verify nested recall across reloads and forks.
@Pepps233
Pepps233 merged commit a109423 into feat/compact-complete-context Nov 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coding-agent enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant