Skip to content

/ce-compound Phase 1 subagent text-return contract is brittle — apply the fix from #733 to it too #956

Description

@digitalcostas

Background

#733 (closed 2026-05-01) documented that subagents fail silently when asked to return long-form prose. Quoting the maintainer (@tmchow) on the resolution: "it's been failing silently and returning the info back to the orchestrator which is why it doesn't technically fail today. I'll add the Write permission."

That fix landed for /ce-code-review persona agents — their frontmatter now includes Write, and the SKILL.md was rewritten to require disk-artifact output. The fix is working: in a 13-subagent dispatch this week, all 13 persona artifacts were on disk even when 6 of 13 inline returns were summary-only. The disk fallback covered the gap entirely.

The same fix has not been propagated to /ce-compound Phase 1.

Reproduction (/ce-compound)

Run /ce-compound Full mode in any project on a non-trivial solved problem. Dispatch the 3 Phase 1 subagents (Context Analyzer, Solution Extractor, Related Docs Finder). Observe that some return executive summaries (e.g., "Doc body complete — six sections filled. Returning above.") instead of the requested prose body. The orchestrator has no recovery path because:

  1. The summaries arrive as the subagent's final Agent tool response; the original prose is unrecoverable from the orchestrator side.
  2. The idle_notification events are a separate heartbeat, not the return value.
  3. No disk artifact exists to fall back to.

Why it persists in /ce-compound

The SKILL.md explicitly forbids subagent file writes in Phase 1:

Phase 1 subagents return TEXT DATA to the orchestrator. They must NOT use Write, Edit, or create any files. Only the orchestrator writes files.

This forces the brittle text-return shape that #733's fix moved /ce-code-review away from. The inconsistency between the two skills' subagent contracts in the same plugin is the bug — the disk-artifact pattern is already proven, just not applied here.

Fix proposal

Relax the "must NOT use Write" rule in /ce-compound Phase 1. Instruct subagents to write their structured output to /tmp/compound-engineering/ce-compound/<run-id>/<step>.{md,json} and return only the path in their final response. The orchestrator Reads the artifact files in Phase 2 assembly.

The skill's higher-level "single deliverable" rule still holds — only the orchestrator writes to docs/solutions/. Phase 1's intermediate artifacts on /tmp/ are scratch space, identical in spirit to /ce-code-review's /tmp/compound-engineering/ce-code-review/<run-id>/<reviewer>.json.

A shorter version of the SKILL.md change might look like:

- Phase 1 subagents return TEXT DATA to the orchestrator.
- They must NOT use Write, Edit, or create any files.
- Only the orchestrator writes files.
+ Phase 1 subagents write their structured output to
+ `/tmp/compound-engineering/ce-compound/<run-id>/<step>.{md,json}`.
+ Each subagent's final response is a one-line confirmation
+ containing the artifact path.
+ The orchestrator Reads the artifact files in Phase 2 assembly.
+ Only the orchestrator writes the final doc to `docs/solutions/`.

The corresponding agents/*.md frontmatter for the Phase 1 personas (Context Analyzer, Solution Extractor, Related Docs Finder, ce-sessions-historian) would need Write added to their tool lists — same change #733 applied to the /ce-code-review personas.

Evidence from a 2026-06-17 session

DealSplash agency-tier provisioning ship (PR #194, merged c759d661). Same session ran three CE skills with parallel subagent dispatch:

Skill Subagents Returned full content Returned summary only Wrote to disk
/ce-code-review (post-#733 contract) 13 7 6 13 (all)
/ce-simplify-code 3 1 2 3 (all)
/ce-compound Full mode (pre-fix contract) 3 1 2 0 (skill forbids it)

For /ce-compound, the orchestrator had to synthesize the doc directly from its own conversation context, voiding the parallelism savings the Full-mode dispatch was supposed to buy. Switching to Lightweight mode for the next two docs in the same session was strictly faster and lossless.

Related issues

  • #733 (CLOSED) — the resolution pattern this proposal would apply to /ce-compound Phase 1.
  • #186 (OPEN) — adjacent open question about sub-agent context retention in /ce-compound. Different framing (context loss vs. return-shape brittleness) but in the same surface area.

A fuller writeup of the failure mode + workaround lives at the reporter's project under docs/solutions/workflow-issues/ce-skill-subagent-text-return-brittleness.md if useful as additional context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions