Skip to content

feat(coding-agent): allow compaction of complete context - #319

Merged
Pepps233 merged 2 commits into
mainfrom
feat/compact-complete-context
Nov 7, 2026
Merged

Pepps233 merged 2 commits into
mainfrom
feat/compact-complete-context

Conversation

@Pepps233

@Pepps233 Pepps233 commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Allow compaction of the first or latest user message and the latest complete assistant exchange.

Reasoning

Recency alone should not make otherwise complete context ineligible for compaction.
Protection remains tied to exchange integrity and custom or extension messages.

Changes

  • Remove latest-user and latest-assistant protection from context indexing.
  • Preserve protection for incomplete or malformed exchanges and custom or extension messages.
  • Update compact tool guidance and recovery expectations.
  • Cover first/latest user messages and complete assistant/tool exchanges through the faux-provider session tool loop.

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 passed during implementation.
  • Reproduced the previous selection restrictions through faux-provider end-to-end tests before changing the implementation.

- Allow user messages and the latest complete exchange to be summarized.
- Preserve malformed exchanges and custom instructions through compaction and recovery.
@Pepps233
Pepps233 merged commit 5b4b43e into main Nov 7, 2026
19 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