Skip to content

fix(review,discovery): state the hand-back size in four agents and the research brief - #13979

Merged
kyle-sexton merged 4 commits into
mainfrom
fix/12469-report-size-line
Nov 7, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
fix/12469-report-size-line

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Closes #12469

Summary

Done-when 2 of #12469 asks that the top agent types or briefs by bytes return a file pointer and a summary under a stated size. The static grading at #12469 (comment) found that only the implementation agents carried the size, because they preload a report skill. This PR states the 3,400-byte aim under the 4,096-byte cap in the four items graded PARTIAL or MISSING.

  • review:code-reviewer and review:security-reviewer: the Cap. paragraph gives the size for a persistence: written reply, and detail goes in the findings file.
  • discovery:researcher: the return section gives the size, and detail goes in the artifact artifact: points at.
  • discovery:research-verifier: the return section names target_as_received, the artifact it graded, as its file pointer, with the bullets as the summary under the same size. It stays read-only: its "Tool honesty" section keeps one writer per memory slice, so it gets no Write tool and writes no file of its own.
  • The deep tier's researcher dispatch (context/deep-tier.md) carries a Return: line with the size. skills/research/SKILL.md is unchanged. Its envelope must match reference/parent-contract.md byte for byte, and ### Effort, source breadth sits 25 bytes inside the 20,000-byte re-attach slice (scripts/contract.test.sh). Done-when 2 accepts the agent definitions, which carry the size.

Fix

Five files: one size sentence in each of the four agent definitions, plus the deep tier's Return: line.

Verification

  • plugins/discovery/scripts/contract.test.sh: passes after the SKILL.md revert. Its two failing assertions are what caught the envelope line and the slice overflow.

R402 no-loss eval: base 661df4f15b against head 9e08bb1f13, this change before the rebase. That head also carried the SKILL.md Return: lines this PR has since dropped, so the shipped diff is a subset of the evaluated one. The rebase onto main brought in only plugins/review/lib/prior-findings.mjs, its test and a release bump, none of which is an agent or skill body. Claude Code 2.1.319, --runs 3, every launch through the host eval gate, each case under its own allowed_tools.

  • review: the 7 cases that run the changed agents: code-reviewer-dropped-ci-step, -duplicated-code-severity, -lowered-coverage-bar, and security-reviewer-cache-key-omits-viewer, -delete-shape-check, -llm-output-trusted, -new-dependency-unread. All 14 sides are VALID, at base 1.00 and head 1.00 for every case.
  • discovery: 14 cases.
    • 12 are VALID on both sides, with head equal to base except bs-asks-starting-point-first, which dropped from 1.00 to 0.83: one run in three missed asks-starting-point. That brainstorm case cannot reach this diff, since nothing under skills/brainstorm changed or names either research agent.
    • Excluded on both sides after one rerun each was still INVALID (R382), with sandbox permission denials: rd-unread-page-not-recalled (head) and su-fork-default-print-mode (both sides).
  • Coverage, from the kept traces:
    • review:code-reviewer ran in all 9 code-reviewer runs and review:security-reviewer in all 12 security-reviewer runs. Only 1 of those 21 runs passed a Findings path:, the condition the new sentence applies under.
    • discovery:researcher and discovery:research-verifier ran in none of the 42 discovery runs, because no discovery case dispatches them.
    • So the eval shows no loss on the cases that exist. It does not exercise the research-agent edits or the size limit itself.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 3 commits November 7, 2026 11:43
…e research brief

The 3,400-byte aim under a 4,096-byte cap lived only in the report skills, so
review:code-reviewer, review:security-reviewer, discovery:researcher and
discovery:research-verifier returned a pointer with no stated size. Each now
states it, the research dispatch prompts carry a Return: line, and the
verifier names target_as_received as its file pointer.

Refs: #12469

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e intact

The Return: lines in skills/research/SKILL.md broke two contract checks:
the envelope must match parent-contract.md's byte for byte, and the extra
lines pushed "### Effort, source breadth" past the 20,000-byte re-attach
slice. Both research agents state the size in their own definitions, which
done-when 2 accepts, so SKILL.md returns to main's text.

Refs: #12469

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 7, 2026 16:55
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T16:55:29.573242Z
We couldn’t complete this review. Comment @codex review to try again.
52254a6 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed cabd3bc7ae0e470b428477ddedb0576329b02cf8: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #13979, incremental (52254a6 → cabd3bc)

No security issues found. This was an incremental review: I read every hunk of both files in its scope.

What changed since the last review:

  • plugins/discovery/agents/researcher.md: the reply-size sentence ("aim for 3,400 bytes; the whole message must stay under 4,096") now applies only when the reply uses persistence: written.
  • plugins/discovery/skills/research/context/deep-tier.md: the Return: line in the researcher dispatch envelope says the same thing. The line is still fixed text with nothing interpolated into it, so no new untrusted text reaches a lane.

Checks:

  • Instruction-surface lens: the change narrows a standing instruction, the size limit on a reply, so I read it under this lens before treating it as prose-only. The limit only controls how many bytes go back to the parent session. Removing it in some modes does not let any action run, any content leave the machine, or any tool, permission or write boundary widen. Nothing else in the researcher agent changes: no tool grants, no skills: preloads and no read-only rules. I did not open the protected-class register, but judged by consequence, a size limit belongs to none of the security classes.
  • Trust controls / manifests: no trusted path, gate, token, kill switch, merge hold, plugin.json or marketplace.json is touched.
  • PR context: it contains no text aimed at this lane.
  • Spend: none. The change only affects how long a reply is.

Prior findings: the only earlier post is the last review's summary, which reported 0 findings, so there is nothing to carry forward. This review was blocking only (blocking only: yes), so it reports only CRITICAL and IMPORTANT findings, and there are none.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 1 inline finding(s) on 52254a686f955c9c51d6720db05729e76d6935f6; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/discovery/agents/researcher.md Resolved
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed cabd3bc7ae0e470b428477ddedb0576329b02cf8: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #13979 (incremental, 52254a68 → cabd3bc7)

Blocking only. This lane already reviewed an earlier head (blocking only: yes), so this pass reports blocking findings only. I read both files in the incremental scope in full: plugins/discovery/agents/researcher.md and plugins/discovery/skills/research/context/deep-tier.md.

What changed. This push applies the fix from this lane's earlier inline finding (discussion_r4502881197). The owner has resolved that thread.

  • researcher.md:355-357: the size sentence now applies only "With persistence: written". The persistence: by-value path, which appends every artifact body verbatim, no longer conflicts with the 4,096-byte limit. The wording matches the field's real values (persistence: written # written | by-value at L364, and L417-L419) and the scoping used in the two reviewer agents.
  • deep-tier.md:83: the dispatch envelope's Return: line now says "under 4,096 bytes with persistence: written (aim for 3,400)". The prompt string still closes once, on the same line.

Checks. No script or test under plugins/discovery matches the Return: your return block line or the size wording exactly (grep over the plugin), so the reword breaks no assertion I could find. I did not run contract.test.sh. The PR's report that it passes is the author's claim and I haven't verified it.

Findings

None blocking.

Notes

  • Settled thread: the researcher-limit thread is resolved and marked lines changed since resolution: no at this head, and the change above does what that thread asked.
  • Advisory finding from the earlier review: it noted that no test asserts the stated size (closing issue perf: shorten subagent hand-back reports where a file pointer and summary would do #12469, done-when 2). It is unchanged and not restated here, because blocking-only mode drops advisory findings.
  • Embedded instructions: none found in the PR context, the settled threads or the prior findings.
  • Manifests: no plugin.json or marketplace.json change in scope.
  • Holds: no hold applies. The change is wording only, with no cost or security impact.

On the by-value path the researcher appends the artifact bodies after its
block, and they are the only copy of the run, so an unconditional 4,096-byte
cap would truncate them. The cap and the deep tier's Return: line now apply
only with persistence: written, as in the reviewer agents.

Refs: #12469

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 7, 2026
Merged via the queue into main with commit 567db46 Nov 7, 2026
81 of 83 checks passed
@kyle-sexton
kyle-sexton deleted the fix/12469-report-size-line branch November 7, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf: shorten subagent hand-back reports where a file pointer and summary would do

1 participant