Skip to content

fix(skills): explain worker resource delivery limits - #164012

Merged
vincentkoc merged 1 commit into
mainfrom
fix/skill-delivery-limit-copy-20261003
Oct 3, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/skill-delivery-limit-copy-20261003

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: a worker-backed conversation shows a generic failure when its selected skill resources exceed the 8 MiB delivery limit, hiding the recovery step.

User Impact

User impact: the failure now explains the limit and asks users to select fewer skills before retrying. The delivery cap and supporting resources stay unchanged.

Why This Change Was Made

The Gateway now identifies this prelaunch failure with a dedicated error type. Shared reply rendering shows fixed guidance for that error, including when wrapped as a cause, while unrelated errors retain their existing privacy protections.

Related: #152926 addresses redundant skill uploads; this change only makes the existing size-limit failure actionable.

Evidence

  • Before the fix, both direct and wrapped reply regressions returned generic copy; the aggregate-overflow test threw an untyped error.
  • All 59 focused tests passed with --maxWorkers=1 across the resource-delivery and failure-reply suites (20.10 seconds total, including 12.75 seconds of compiler preparation). The resource suite took 2.12 seconds, with about 0.3 seconds in tests.
  • The producer test accepts exactly 8 MiB and rejects one additional byte. Reply tests cover direct and wrapped errors plus same-message, spoofed-name, and unrelated skill-error privacy controls.
  • Independent source review and P2 autoreview found no actionable issues. Native wrapper inventory proof passed.
  • Native changed-file checks passed, including production types, all 27 core-test type graphs, targeted lint, import cycles, and repository guards.
  • Exact-head CI passed: run 37094263003, attempt 1, 509 seconds overall; the final core-test type shard took 350 seconds. ClawSweeper also completed with no actionable findings.
  • No live host configuration or recovery is claimed.

@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 3, 2026 03:45
@vincentkoc vincentkoc self-assigned this Oct 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 2, 2026, 11:50 PM ET / October 3, 2026, 03:50 UTC.

ClawSweeper review

What this changes

The PR gives oversized worker skill deliveries a dedicated error type and shows users fixed guidance to select fewer skills, with boundary and privacy regression coverage.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still hides the resource-limit recovery guidance. No actionable patch defect was found, and the related upload-reuse PR addresses a distinct problem.

Priority: P2
Reviewed head: 142fc25359ceab6f36626f1e7544a8a68f782c77

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with meaningful limit and privacy regressions and no concrete correctness finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This MEMBER-authored PR is exempt from ordinary external-contributor proof. Source and reported focused tests cover the Gateway resource-limit producer and reply renderer; no live run is claimed, and no authority or stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored PR is exempt from ordinary external-contributor proof. Source and reported focused tests cover the Gateway resource-limit producer and reply renderer; no live run is claimed, and no authority or stored-data contract changes.
Evidence reviewed 8 items Verified introduced patch: The pinned introduction changes only resource-limit identification, shared reply rendering, and their tests. The verified test merge preserves the same focused production changes.
Current main still needs the fix: Fetched main retains the ordinary Error at aggregate overflow and lacks the new typed-error reply branch. Current-main inspection therefore establishes a remaining useful contribution.
Documented limit and recovery: The skills documentation defines the existing 8 MiB aggregate worker-delivery cap and tells users to narrow session selection; the proposed reply exposes that established recovery path.
Findings None None.
Security None None.

How this fits together

The Gateway prepares selected skill instructions and supporting files before launching a worker conversation. Its shared failure renderer turns preparation errors into replies shown to users.

flowchart TD
  A[Selected skills] --> B[Gateway prepares resources]
  B --> C{Within 8 MiB limit?}
  C -->|Yes| D[Launch worker conversation]
  C -->|No| E[Typed delivery error]
  E --> F[Shared failure renderer]
  F --> G[Select fewer skills guidance]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +18, Tests +59. Total +77 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 21 3 +18
Tests 2 59 0 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 80 3 +77

Review metrics

Metric Value Why it matters
Production versus test growth production +18 net lines, tests +59 lines Production growth is justified by a lightweight typed error and curated reply branch; tests protect limit boundaries and diagnostic privacy.

Technical review

Best possible solution:

Keep the existing delivery cap and expose its established selection-based recovery through the shared failure renderer.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: selected bundles totaling more than 8 MiB throw an untyped error on current main, which falls through to generic failure copy without verbose diagnostics. No runtime reproduction was executed in this read-only review.

Is this the best way to solve the issue?

Yes. Identifying the existing producer failure and rendering constant recovery text is a narrow repair that preserves limits and unrelated diagnostic privacy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 7bc45fa2b9e6.

Labels

Label changes:

  • add P2: This improves recovery from a bounded worker preparation failure without changing execution limits or configuration.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from ordinary external-contributor proof. Source and reported focused tests cover the Gateway resource-limit producer and reply renderer; no live run is claimed, and no authority or stored-data contract changes.

Label justifications:

  • P2: This improves recovery from a bounded worker preparation failure without changing execution limits or configuration.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored PR is exempt from ordinary external-contributor proof. Source and reported focused tests cover the Gateway resource-limit producer and reply renderer; no live run is claimed, and no authority or stored-data contract changes.

Evidence

What I checked:

  • Verified introduced patch: The pinned introduction changes only resource-limit identification, shared reply rendering, and their tests. The verified test merge preserves the same focused production changes. (src/skills/runtime/resources.ts:320, 142fc25359ce)
  • Current main still needs the fix: Fetched main retains the ordinary Error at aggregate overflow and lacks the new typed-error reply branch. Current-main inspection therefore establishes a remaining useful contribution. (src/skills/runtime/resources.ts:320, 7bc45fa2b9e6)
  • Documented limit and recovery: The skills documentation defines the existing 8 MiB aggregate worker-delivery cap and tells users to narrow session selection; the proposed reply exposes that established recovery path. Public docs: docs/tools/skills.md. (docs/tools/skills.md:202, 142fc25359ce)
  • Production boundary and safe disclosure: Resource preparation happens in the Gateway before worker launch. The renderer recognizes actual error instances through the existing cause traversal and returns constant text, without exposing paths or wrapper diagnostics. (src/auto-reply/reply/agent-runner-failure-reply.ts:265, 142fc25359ce)
  • Meaningful regression coverage: The producer test accepts exactly 8 MiB and rejects one additional byte. Reply cases cover direct and wrapped typed errors, matching untyped messages, spoofed names, and unrelated skill errors. The captured body reports 59 focused tests passing in 20.10 seconds; this review did not execute tests. (src/skills/runtime/resources.test.ts:28, 142fc25359ce)
  • Related work is complementary: fix: bound sessions fail when duplicate skill uploads exceed the limit #152926 remains open in the captured context and proposes avoiding redundant uploads through verified node-local skill reuse. This PR improves the legitimate overflow failure rather than implementing that reuse contract.

Likely related people:

  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit 60bdc8f into main Oct 3, 2026
207 checks passed
@vincentkoc
vincentkoc deleted the fix/skill-delivery-limit-copy-20261003 branch October 3, 2026 03:58
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant