fix: prevent empty-{} loop in DUUL review tools (optional fields + file inputs)#16
Merged
Merged
Conversation
… inputs
request_plan_review / request_code_review / request_execution_partition
collapsed to an empty {} when a large plan/code string was inlined, and the
MCP SDK rejected it pre-handler (-32602: required) before the recovery guard
could run — leaving callers in an unrecoverable identical-retry loop.
- Relax large required string fields (plan, code, approved_plan, partition
workspace_root) to optional so the handler's friendly guard is reachable
- Add plan_file / code_file / approved_plan_file: write large content to a
file and pass a relative path; server reads it scoped + symlink-guarded
- Harden safePath: apply sensitive/blocked-path checks to the symlink-resolved
real path, not just the logical path (closes in-root symlink-to-secret read)
- Reviewer system prompts emit compressed output to save tokens
- duul-planner now runs on Opus and submits plans via plan_file
- Update README / README.ko / CLAUDE.md / agent prompt; add tests + changeset
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
request_plan_review/request_code_review/request_execution_partitionlooped onMCP -32602: ... requiredwhenever a caller emitted an empty{}argument object. Root cause:plan/codestring collapses to{}when serialized into the tools' ~25-field nested schema (worse on Sonnet)..min(1)field made the MCP SDK reject pre-handler, so the handler's friendly retry guard was dead code → unrecoverable identical-retry loop.Confirmed empirically across ~15 workspace transcripts (
keys=[], repeated).Fix
plan,code,approved_plan, partitionworkspace_root) tooptional; the handler now returns actionable guidance instead of opaque-32602.plan_file/code_file/approved_plan_file— write big content to a file, pass a relative path; server reads it scoped + symlink-guarded.safePathnow applies sensitive/blocked-path checks to the symlink-resolved real path too (closes in-rootsymlink → .envread). Regression test added.duul-plannerswitched to Opus + submits viaplan_file.Verification
tscclean, 68/68 tests pass (8 new forresolveInlineOrFileincl. symlink-bypass).🤖 Generated with Claude Code