Skip to content

Add non-destructive chat context compaction - #73

Merged
szweibel merged 2 commits into
mainfrom
feat/agent-studio-chat-compaction-20260909
Sep 10, 2026
Merged

szweibel merged 2 commits into
mainfrom
feat/agent-studio-chat-compaction-20260909

Conversation

@szweibel

Copy link
Copy Markdown
Contributor

Summary

  • add an app-owned SQLite compaction overlay while preserving the canonical AIChatAgent transcript, files, UI history, and exports
  • compact only complete settled turns, retaining the first complete turn plus the three most recent turns with tool and reasoning groups intact
  • use 80%/60% high-water and target-water hysteresis, capped by explicit system, tool, and output reserves
  • preserve exact server-validated panel-scope provenance and invalidate stale overlays with a content fingerprint
  • keep summaries chronological, bounded, non-system-role, and free of raw reasoning; retain the prior overlay if compaction fails

Verification

  • bun run check
    • backend: 464 passed
    • frontend: 282 passed
    • tooling: 22 passed
    • production build and Wrangler staging dry run passed
  • actual local Worker lifecycle smoke passed and deleted its synthetic workspace
  • browser acceptance passed: canvas persistence, file bytes, export/import, gallery lifecycle, preview isolation, reload, and UI cleanup

No deployment is included.

@szweibel
szweibel force-pushed the feat/agent-studio-chat-compaction-20260909 branch 2 times, most recently from 72c7742 to ec30ae8 Compare September 10, 2026 01:04
@szweibel
szweibel force-pushed the feat/agent-studio-chat-compaction-20260909 branch from ec30ae8 to 669cac3 Compare September 10, 2026 01:20
@szweibel
szweibel merged commit 3ca43d8 into main Sep 10, 2026
2 checks passed
@szweibel
szweibel deleted the feat/agent-studio-chat-compaction-20260909 branch September 10, 2026 01:30
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