Replies: 1 comment
Research Enhancement — Infinite Conversations via Client-Side CompactionCritical Update: Client-Side Compaction is DeprecatedThe original proposal assumed the Claude SDK's client-side Anthropic's recommended replacement is server-side compaction via the Compaction API (beta: Sharpened Problem FramingThe core problem remains valid and urgent: without compaction, long agentic workflows (BMAD brainstorming can generate 24+ ideas across many turns) hit context window limits, breaking the "relationship layer" that makes TalkTerm's avatar meaningful. But the implementation path has changed — the solution is now server-side API configuration, not SDK-level configuration. Server-Side Compaction: How It Works
Supported models: Opus 4.6-4.8, Sonnet 4.6-5, Fable 5, Mythos 5 Prior Art & Competitive Approaches
Options Table
Recommendation: Option C — server-side compaction solves the in-session context window problem, while the SQLite memory index (already planned in the architecture) handles cross-session memory. These are complementary, not alternatives. The Risks & Unknowns
Phased Validation Path
Success Metrics
|
Uh oh!
There was an error while loading. Please reload this page.
Summary
Leverage the Claude SDK'"'"'s new client-side compaction feature to enable effectively infinite conversation sessions. When the context window fills up during long workflows, the SDK automatically summarizes earlier conversation turns while preserving key decisions and context. This directly enables TalkTerm'"'"'s cross-session memory vision (FR46-47) without custom summarization logic, allowing the avatar to maintain rich understanding of a user'"'"'s work across weeks and months of interaction.
Market Signal
The Claude API platform launched client-side compaction in both Python and TypeScript SDKs in early 2026, with server-side compaction API in beta on Opus 4.6. This is a direct response to the industry'"'"'s "context window problem" — agents that lose context mid-workflow break user trust. Competitors like ChatGPT Atlas handle this with conversation branching, while Devin uses project-level memory stores. The compaction approach is unique in preserving conversational continuity rather than forcing users to start new sessions, which aligns perfectly with TalkTerm'"'"'s relationship-first design philosophy.
User Signal
FR46 requires persisting "conversation context, user decisions, project vocabulary, and workflow outcomes across sessions." FR47 requires the avatar to "reference past work naturally in conversation." The architecture calls for "lightweight memory index in SQLite (key decisions, project vocabulary, user preferences) for fast avatar greeting personalization." Currently, without compaction, long BMAD workflows (brainstorming can generate 24+ ideas) risk hitting context limits. The PRD'"'"'s User Journey 1 shows Sarah using TalkTerm daily — compaction is what makes multi-day continuity possible.
Technical Opportunity
The Claude Agent SDK'"'"'s
tool_runnernow supports automatic client-side compaction — it is a configuration option, not a custom implementation. The architecture already stores session IDs in SQLite for resume (FR31), and the compaction summaries can be stored alongside them. TheAgentBackendport in the Agent bounded context can expose compaction configuration as part of session options. Theget_context_usage()method enables the UI to show users how much context remains, which pairs naturally with the effort modes proposal for cost transparency.Assessment
Suggested Next Step
Spike on enabling client-side compaction in the Claude Agent SDK TypeScript integration. Test with a multi-session BMAD brainstorming workflow to validate that compacted context preserves decision history and project vocabulary. Design the SQLite schema for storing compaction summaries alongside session metadata.
Proposed by the BMAD Analyst (Mary) on 2026-04-05.
All reactions