Skip to content

API Reference parrot.flows.dev_loop.sdd_coder.claude_compaction_driver

github-actions[bot] edited this page Nov 10, 2026 · 4 revisions

parrot.flows.dev_loop.sdd_coder.claude_compaction_driver

View source

Concrete receipt-reading compaction driver for the main Claude Code loop.

The Claude Code hook owns $.session.compact(). Python has no invocation surface for it, so this driver only records its intent and reports an observed receipt when one is available. No observable receipt channel is currently homologated for this process, therefore it fails explicitly rather than mistaking silence for a completed compaction.

Class ClaudeMainLoopCompactionDriver

PhaseBoundaryDriver for the main loop that reads receipts but never invokes compaction.

Parameter Type Default Description
worktree_root Path Worktree whose plugin installation is evaluated.
store ExecutionEvidenceStore Durable store used for the request and outcome events.

Method ClaudeMainLoopCompactionDriver.supports

Return whether the main context has all required local installation wiring.

supports(context_id: str) -> bool

Parameter Type Default Description
context_id str

Returns: bool

Method ClaudeMainLoopCompactionDriver.compact

Record an honest compaction observation result for a main-loop checkpoint.

The host offers no Python-side receipt stream, environment variable, or documented transcript/log endpoint that can be correlated to this checkpoint. Returning an explicit failure preserves the checkpoint handoff while ensuring no success is manufactured from that absence.

compact(checkpoint: ReviewCheckpoint) -> CompactionReceipt

Parameter Type Default Description
checkpoint ReviewCheckpoint Checkpoint identifying the main conversation context.

Returns: CompactionReceipt — Durable-event-backed receipt with an explicit unsupported or failed result.

Raises:

  • ValueError — The checkpoint does not identify the main context.

Alias CompactionReceipt

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.CompactionReceipt.

Alias ExecutionEvidenceStore

Re-exported from parrot.flows.dev_loop.sdd_coder.evidence.ExecutionEvidenceStore.

Alias ReviewCheckpoint

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.ReviewCheckpoint.

Alias WorkflowEvent

Re-exported from parrot.flows.dev_loop.sdd_coder.optimization_models.WorkflowEvent.

Alias compaction_status

Re-exported from parrot.knowledge.wiki.claude_code.compaction.compaction_status.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally