II.
Page JSON
Structured · livepage:docs-harness-features-backlog-gaps-performance-gap-perf-002
GAP-PERF-002: Session Compaction json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:docs-harness-features-backlog-gaps-performance-gap-perf-002",
"_kind": "Page",
"_file": "wiki/docs/harness-features-backlog/gaps/performance/gap-perf-002.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"sourcePath": "docs/harness-features-backlog/gaps/performance/GAP-PERF-002.md",
"sourceKind": "repo-docs",
"title": "GAP-PERF-002: Session Compaction",
"displayName": "GAP-PERF-002: Session Compaction",
"slug": "docs/harness-features-backlog/gaps/performance/gap-perf-002",
"articlePath": "wiki/docs/harness-features-backlog/gaps/performance/GAP-PERF-002.md",
"article": "\n# GAP-PERF-002: Session Compaction\n\n| Field | Value |\n|-------|-------|\n| Category | performance |\n| Priority | Critical |\n| Effort | XL |\n| Status | Partial |\n\n## Description\nImplement session-level compaction that summarizes and condenses orchestration history, preventing context window overflow during long runs.\n\n## Current State\nThe compression module provides FNV-1a hash-based dedup and library file caching. This is token-level compression, not session-level compaction. The harness never summarizes or condenses conversation history.\n\n## Target State\nMultiple compaction strategies: tool-output summarization, resolved effect pruning, iteration digest. Auto-compact trigger based on token budget thresholds. PreCompact/PostCompact hooks for custom behavior.\n\n## Dependencies\n- [GAP-PROMPT-001](../prompt-engineering/GAP-PROMPT-001.md) -- prompt strata model for identifying compactable sections\n\n## Key Files\n| Component | Path |\n|-----------|------|\n| Compression module | `packages/babysitter-sdk/src/compression/` |\n| Hook dispatcher | `packages/babysitter-sdk/src/hooks/dispatcher.ts` |\n| State cache | `packages/babysitter-sdk/src/runtime/replay/stateCache.ts` |\n\n## Recommendation\nPhase 3 implementation. Auto-compact trigger at token budget threshold. At least 2 strategies: tool-output summarization and iteration digest. Integrate via on-iteration-end hook.\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:docs-harness-features-backlog",
"to": "page:docs-harness-features-backlog-gaps-performance-gap-perf-002",
"kind": "contains_page"
}
]
}