compound-engineering-plugin icon indicating copy to clipboard operation
compound-engineering-plugin copied to clipboard

ce-code-review: report leaf cannot write report.md on Claude Code (subagent report writes are blocked)

Open Fetterj opened this issue 2 months ago • 3 comments

Problem

In ce-code-review Stages 5–6, the report leaf subagent (seeded with references/finish-review.md) is told to write report.md into the run directory. On a Claude Code host, the harness refuses report-shaped Markdown writes from subagents ("Subagents should return findings as text"). On every run the leaf returned the report in-band with a note that the write failed, and the run directory has no report.md.

Seen on five consecutive runs (four ce-code-review, one ce-doc-review) with compound-engineering v3.28.2 on Claude Code.

Impact

The report is still emitted to the user, but the run-artifact list is incomplete. Anything that later reads report.md from the run dir (resume, audit, comparing rounds) finds nothing.

Suggestion

Have the dispatch context, which already receives the leaf's return verbatim, write report.md from that return. The leaf then only renders and never writes, which matches what the host allows.

Fetterj avatar Sep 24 '26 11:09 Fetterj

Seeing the same here (compound-engineering 3.25.0, Claude Code 2.1.287).

In case it helps with the fix: the refusal is in Claude Code's Write tool and keys on the file's basename. A subagent's Write is refused when the basename matches ^(REPORT|SUMMARY|FINDINGS|ANALYSIS).*\.md$, case-insensitive. Bash and Edit aren't checked. Renaming the artifact to something that doesn't start with one of those words (e.g. rendered-report.md) should let the report leaf write it with no other change. In a probe, u1-report.md, review.md and report.txt were all accepted.

ak2k avatar Oct 04 '26 12:10 ak2k

Same on 3.27.0 with Claude Code: 4 runs across two weeks where the report leaf's report.md write was refused and the report came back in-band only. We work around it by having the dispatch context write report.md from the leaf's return, as suggested above.

ernest0vm avatar Oct 13 '26 16:10 ernest0vm

Still present on compound-engineering 3.30.3 with Claude Code 2.1.306. The same check (tengu_subagent_md_report_blocked) is in the 2.1.304 and 2.1.305 binaries too.

Two runs this week, both full-depth reviews: the report leaf's report.md write was refused, while its metadata.json write and run-log.py summarize succeeded, so metadata.json reports status: complete with no report.md beside it. Anything that reads the run directory afterwards gets a complete run with no report.

We work around it the same way, by having the dispatch context write report.md from the leaf's return. A fix in references/finish-input.md ("The report leaf" section) along those lines would make the run directory consistent again.

cpeddle avatar Oct 21 '26 11:10 cpeddle