Add compaction directives to context management#17
Open
jeremyandrews wants to merge 1 commit into
Open
Conversation
Context compaction (automatic summarization when the context window fills) drops session-specific state unless explicitly told what to preserve. Add compaction directives to JESSE.md that protect routine phase, modified files, user corrections, and other ephemeral state. Add compaction awareness to the Start-of-Day routine (most likely to trigger compaction). Add a Core Principle requiring the agent to re-read the instruction file after any compaction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Context compaction (automatic summarization when the context window fills) drops session-specific state unless told what to preserve. This PR adds:
The governing principle: preserve session state that can't be reconstructed from the vault. Raw tool outputs and file contents are safe to drop (they're either persisted or were only needed momentarily). Ephemeral coordination state — where we are, what's changed, what the user corrected — must survive.
Based on Anthropic's context engineering best practices and real-world community experience with compaction failures.