Skip to content

PR body is the coder's full raw output (reasoning), not a clean summary (loop.py:699) #56

Description

@mabry1985

Bug: the PR body is the coder's full raw output (reasoning included), not a clean summary

The loop opens each feature's PR using the coder's entire returned text as the body:

# loop.py:699
pr_url = await worktree.open_pr(wt, branch, base=base, title=title, body=(result or "")[:4000])

result is the coder's full ACP message, so the PR description ends up containing the coder's step-by-step reasoning narration, not a summary of the change.

What it looks like (real PR, ~3,344 chars)

I'll start by exploring the repo structure to understand the docs setup...I'll start by
exploring the repo structure...   ← duplicated opening line
Now let me look at the docs/skills directory...
Let me examine the existing skill file for style...
The VitePress config has ignoreDeadLinks: true...
...
## Summary
**Files changed:** ...
NO_TEST_NEEDED: ...

Two distinct problems visible:

  1. Reasoning leaks into the PR body — the bulk is the coder thinking out loud; the actual ## Summary is buried at the end.
  2. The opening line is duplicated — suggests the ACP message accumulation in acp_client.py double-counts the first agent_message_chunk (or proto re-emits it). Worth a look separately.

Impact

Every feature PR gets a noisy, hard-to-review description. A reviewer has to scroll past the agent's monologue to find what changed.

Proposed

Build the PR body from a clean summary, not the raw stream:

  • Prefer the coder's ## Summary section if present (drop everything before it); else a short template (feature title + spec/acceptance link + "see the diff").
  • Never include the reasoning/thought narration or the NO_TEST_NEEDED/control markers.
  • Fix (or dedupe) the leading-chunk duplication in acp_client.py.

Seen on real feature PRs (project_board v0.19.0, coder=proto).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    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