Skip to content

Add compaction directives to context management#17

Open
jeremyandrews wants to merge 1 commit into
tag1consulting:mainfrom
jeremyandrews:feature/compaction-directives
Open

Add compaction directives to context management#17
jeremyandrews wants to merge 1 commit into
tag1consulting:mainfrom
jeremyandrews:feature/compaction-directives

Conversation

@jeremyandrews

Copy link
Copy Markdown
Member

Summary

Context compaction (automatic summarization when the context window fills) drops session-specific state unless told what to preserve. This PR adds:

  1. Compaction directives in the Context Management section — a list of what must survive every compaction (routine phase, modified files, user corrections, pending inbox items, active drafts, current date)
  2. Compaction awareness note in Start-of-Day-Routine.md — warns that the routine is long enough to trigger compaction and gives recovery steps
  3. Core Principle requiring instruction file re-read after any compaction

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant