Skip to content

feat: add context assembler with token budget and auto-compaction#56

Open
buuzzy wants to merge 1 commit into
workany-ai:devfrom
buuzzy:feat/context-assembler
Open

feat: add context assembler with token budget and auto-compaction#56
buuzzy wants to merge 1 commit into
workany-ai:devfrom
buuzzy:feat/context-assembler

Conversation

@buuzzy
Copy link
Copy Markdown

@buuzzy buuzzy commented Apr 17, 2026

Replaces the simple 2K-token conversation truncation with a proper context management system:

  • Token-budget-aware assembly (12K tokens default, up from 2K)
  • Auto-compaction: older messages summarized via LLM with strict identifier preservation (paths, URLs, IDs never lost)
  • Disk-persisted sessions (~/.workany/sessions/): full history on disk, compaction only affects model context
  • Graceful fallback: if compaction fails, falls back to simple truncation

Files: shared/context/assembler.ts, compaction.ts, session-store.ts + codeany adapter integration

Replaces simple 2K-token truncation with a proper context management
system: token-budget-aware assembly (12K default), LLM-based compaction
with identifier preservation, and disk-persisted session store.
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