Skip to content

perf(plugins): aim dispatched-agent reports at 3,400 bytes under the 4,096 cap - #13464

Merged
kyle-sexton merged 1 commit into
mainfrom
perf/12469-report-aim
Nov 5, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
perf/12469-report-aim

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #12469

Summary

The 4,096-byte cap on dispatched-agent reports (PR 12740) cut the tail, but half of the capped reports still exceed it. Agents aim at the stated number and land just above it. The after-window measurement is on #12469: capped implementer reports had a median body of 4,059 bytes and a p90 of 4,764, with 50 of 101 over 4,096.

Fix

  • In the three byte-identical copies of the return contract (plugins/{discovery,implementation,plugin-quality}/skills/report/SKILL.md), the size line now reads: "Aim for 3,400 bytes; the whole message must stay under 4,096."
  • The 4,096 limit stays. The aim leaves room for the overshoot seen at p90 (about 17%). Basis: judgment, on the after-window figures.
  • One changelog fragment per plugin.

Verification

  • scripts/check-affected.sh: 14 passed, 2 skipped. That includes the contract copies' byte-identity check (validate-plugin-contracts).
  • cmp shows the three copies are identical.
  • Not run: the after-effect. It needs transcripts from after the host's plugin update.

Related

🤖 Generated with Claude Code

…4,096 cap

Over the 48 h after the cap shipped, capped implementer reports had a
median body of 4,059 bytes and a p90 of 4,764: half still exceeded
4,096. Agents aim at the stated number and overshoot it, so the
contract now states a 3,400-byte aim and keeps 4,096 as the limit.

Refs: #12469

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

chatgpt-codex-connector Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-05T07:16:21.340524Z 9397341 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.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Code review: no findings

This PR changes one line of the dispatched-agent return contract. The old line said reports stay under 4,096 bytes. The new line sets a 3,400-byte target and keeps 4,096 as the hard limit. It also adds one patch changelog fragment for each plugin.

What I read

  • plugins/discovery/skills/report/SKILL.md: the whole change. Its copies in plugins/implementation/ and plugins/plugin-quality/ have the same change (per identical.txt). Each copy sits at the same skill path in its own plugin, so the path doesn't change what the content does.
  • .changes/discovery/perf-12469-report-aim-63e9988e.md: the whole change. Its copies under .changes/implementation/ and .changes/plugin-quality/ are identical, and each is in the correct plugin's fragment directory.

Checks

  • The new wording is consistent with itself. It keeps the 4,096 cap as the rule ("must stay under") and adds 3,400 as a target. The fallback guidance for when there's no artifact is unchanged.
  • No other file in the repo quotes the old sentence ("stays under 4,096"), so no copy, test or doc goes stale. The existing CHANGELOG entries describing the 4,096 cap still hold.
  • A bump: patch fits a wording-only change to a skill's guidance.
  • No plugin manifest (plugin.json / marketplace.json) changed, so there are no manifest lines.
  • The PR context has no closing issue (it only says Refs: #12469), so there are no acceptance criteria to check.
  • There are no prior findings, and this is the first review of this PR (not blocking-only).
  • No changed file matches a trusted-path glob.

Not verified by me: the PR author reports that scripts/check-affected.sh passed (14 passed, 2 skipped) and that cmp showed the three copies are identical. I didn't run either one. The effect on real report sizes still needs the re-measurement the PR lists as remaining work on #12469.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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

Security review: PR #13464, no security issues found

I read the whole diff. It has two identical-change groups, and I read the first path of each:

  • Changelog fragments. Three identical bump: patch notes under .changes/{discovery,implementation,plugin-quality}/. They are prose only.
  • Return-contract skill body. The same change in plugins/{discovery,implementation,plugin-quality}/skills/report/SKILL.md. One bullet in "Structure cap" changes from "The whole message stays under 4,096 bytes" to "Aim for 3,400 bytes; the whole message must stay under 4,096." The rest of the bullet only re-wraps: excess detail still goes to the named artifact, and the order for dropping content is unchanged.

Instruction-surface lens. This edits a standing skill body, so I checked it under that lens instead of skipping it as prose-only. No rule is deleted, narrowed or softened. The 4,096-byte limit stays, now as "must". The added aim is stricter than before. The rule against dropping a problems: entry or a verdict before bullets is kept word for word, so nothing that rule prevented loses its check. I did not read the protected-class register (docs/contracts/instruction-exception-register/README.md). It was not needed because no rule was removed. The judgment above is by consequence.

Copies. All six paths are a changelog fragment or a skill body of the same kind. No copy sits at a hook, workflow, settings or manifest path where the same content would act differently.

Scope checks.

  • No changed file matches a TRUSTED PATHS: glob.
  • No trust control, merge hold, token scope, kill switch or workflow is touched.
  • No plugin manifest changed.
  • No secrets, injection surface or untrusted-input handling are involved.

This is the lane's first review of this PR; prior findings are empty and the review was not blocking only.

Spend: none beyond this review run. The change should slightly shorten dispatched-agent reports, which spends less subscription usage, not more.

critical-findings: 0

@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 5b0cf82 Nov 5, 2026
68 checks passed
@kyle-sexton
kyle-sexton deleted the perf/12469-report-aim branch November 5, 2026 07:29
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.

1 participant