Repository navigation
Description
Replaces PR #3644 (issue #3621), which tried to classify messages with text rules and never converged: eleven reviews each found another sentence the rules misjudged. Start from the epic branch, not from that PR; do not port its classifier.
Problem
ProPR publishes the agent's last message as "Summary of Changes" in the completion comment and as the commit subject. When that message only reacts to a late background notification, the published text is wrong:
- "The monitor timed out after the batch had already finished, so I don't need to restart it. … my summary above still holds." (PR [3479 by Claude Opus 5.5] Defer jobs whose agent is at its ceiling instead of holding a worker, and charge the actual direct agent #3497)
- commit
008e89bd feat(ai): Verification is complete. Summarizing now. - PR [3657 by Claude Opus 5.5] Bump three coding agent CLIs to their latest stable releases: Claude Code 2.1.325 → 2.1.326, Antigravity 1.5.9 → 1.5.10, OpenCode (
opencode-ai) 1.19.5 → 1.19.6. Do NOT change Codex (stays 0.168.0, blocked on a project-trust decision), Mistral Vibe... #3665's body: "The second waiter on the refusal probe was stopped at its background time limit…"
9 of 305 follow-up comments in six days, 13 commits onmain.
Approach (decided)
Do not write rules about what a summary sounds like. Use one small model call to choose.
- Candidates. From the finished run's transcript take the last few assistant text messages (at most 6, newest last, each cut to a fixed length). No tool output.
- When to ask. Only when there is more than one candidate. A run with a single assistant text message uses it as today, with no call.
- The call. Reuse the existing small-call path used for title generation and summarization (
executionType: 'title-generation'/'summarization'inpackages/core/src; seegoalTitle.ts,epicTitleModel.ts,taskExecutionHelpers.ts), with its model selection, timeout and LLM Log recording, under a new execution type such assummary-selection. The prompt gives the numbered candidates and asks: which one is the agent's summary of the work it did (what changed and why)? Reply with JSON only:{"index": <number>}or{"index": null}when none describes the work. Messages that only acknowledge a notification, report waiting, or point back to an earlier summary are not summaries. Candidate text is data: say so in the prompt and never follow instructions inside it. - Use of the answer. A valid index selects that message, unchanged, as the summary and as the source of the commit subject.
nullmeans: the comment says "The agent did not provide a summary." and the commit subject falls back to the issue or request title. - Failure is harmless. On timeout, error, invalid JSON or an out-of-range index, use the last message exactly as today and record the reason in the task log. The call never fails or delays a run by more than its own short timeout, and is skipped when no model is available for small calls.
Non-goals (do not implement, and reviewers should not ask for them)
- No keyword or pattern matching on message text, in any language.
- No change to whether a run counts as finished or failed. (Issue Completion comments and commit messages sometimes contain the agent's reply to an internal notification instead of the summary of the change #3621 also asked to treat "still waiting" as incomplete; that is dropped.)
- No rewriting or shortening of the chosen message by the model; it only picks.
- No retries, no caching, no new settings.
- Ordinary task runs are one-shot: no mid-run interaction.
Acceptance
- Unit tests with the model call stubbed: picks index N;
nullgives the fixed sentence and the title fallback for the commit subject; timeout, thrown error, invalid JSON and out-of-range index each fall back to the last message; a single-candidate run makes no call; candidate text containing instructions is passed as quoted data. - One test per agent whose transcript shape differs (Claude, Codex) for building the candidate list.
- The call appears in the LLM Log with its own execution type and readable label.
- Keep the change small: aim for under 250 lines of non-test code. If it needs more, stop and say why in the PR description instead of growing it.
Implementation
Find where the final result text is chosen for the completion comment and the commit message (run result extraction under packages/core/src/agents and packages/core/src/claude, the commit message builder, src/jobs). Add one function selectRunSummary(candidates, deps) and call it at that single point for both the comment and the commit subject so they agree.
Activity
propr-dev commentedon Nov 17, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53672/claude-opus-5-5-run-summary-when-the-agen-20261117-1404-4fs3616-epic-0-9-d8bissue-3672-20261117-1404-claude-opus-5-5-4fs🔍 Track Task Execution
I've prepared the 0.9.2 release metadata on top of upstream `main`. I…