fix(anthropic-auto-compact): run DCP only on compaction failure and retry after pruning (#284)

Make DCP behavior opt-in via new 'dcp_on_compaction_failure' experimental flag (disabled by default).

When enabled, Dynamic Context Pruning only executes after summarization fails, then retries compaction. By default, DCP runs before truncation as before.

Changes:
- Add 'dcp_on_compaction_failure' boolean flag to experimental config (default: false)
- Update executor.ts to check flag before running DCP behavior
- Add corresponding documentation to all 4 README files (EN, KO, JA, ZH-CN)
- Update JSON schema

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-28 00:43:37 +09:00
committed by GitHub
parent 3e180cd9f1
commit c4c0d82f97
10 changed files with 102 additions and 39 deletions

View File

@@ -162,6 +162,8 @@ export const ExperimentalConfigSchema = z.object({
truncate_all_tool_outputs: z.boolean().default(true),
/** Dynamic context pruning configuration */
dynamic_context_pruning: DynamicContextPruningConfigSchema.optional(),
/** Run DCP only when compaction (summarize) fails, then retry compaction (default: false) */
dcp_on_compaction_failure: z.boolean().optional(),
})
export const OhMyOpenCodeConfigSchema = z.object({