Repository navigation
docs(sdk): the agent area's text, tuned on Sonnet and Opus builders - #896
Conversation
|
Review: GPT-6.1-Sol (xhigh), two rounds Round 1, at 50d7d63, found nothing blocking:
Round 2, at 05c35d5, found nothing. The fix is correct and complete against the spec and the code that enforces it. The run records support the tables and the reason for each edit. Mirrored surfaces stay consistent, the length is comparable, and the body holds nothing private. |
1019d93 to
b4dba65
Compare
05c35d5 to
df79c67
Compare
Acceptance: PASS with notesChecked Done means
Sizes count compact structured answers once, without duplicating MCP's text representation. Golden journeys and worker checks Workers used the documented
Rollback answers: #896's text-only answers match its diff: refreshed repos keep the text until their next refresh; no program reads it. The combined stack leaves additive tables/columns, agent log rows and descriptor marks, whose prerequisite readers and credential-ending stamps exist in pinned main. The explicit four-step rehearsal passed: Notes — generated-patch defects classified
Not run
Safety and surfaces Every direct environment CLI call cleared external URL/token variables and used that environment's Before the run, after each builder, after workers and after the rollback rehearsal, both personal directories matched their initial contents: no added, removed or changed files. The team environment and its workspace were removed with Only scenario data and scrubbed excerpts appear here; raw transcripts are not uploaded. The PR's code, branch, body and labels remain unchanged. |
b4dba65 to
9375347
Compare
…ask, and puts result sizes beside schemas Six builder runs (Sonnet 5.5 and Opus 5.5, three requests each) on the stack's own pipeline made working agent areas from the skills. Every one told its person an admin still had to turn agent access on, though it was on: the text said it starts off but not that publish warns while it is. Sonnet read the long skill in pieces and stopped before the limits paragraph, so one list read returned up to 1,000 full rows; the result facts now sit with descriptions and schemas. The spec's fact that clients decide whether to ask before a change, and most ask every time, is back. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… read-only action Co-Authored-By: Claude Opus 5.5 <[email protected]>
…p, and that publish is silent when access is on Co-Authored-By: Claude Opus 5.5 <[email protected]>
…he agent with its details Co-Authored-By: Claude Opus 5.5 <[email protected]>
0ce7c1c to
5b3f7cd
Compare
## What changed This PR adds release 17's What's new entry, written from `5dd94f3`. It covers everything merged since release 16's `through` (`dd3f41f`), and it sets the `patchy` release to `0.17.0` in `packages/patchy/package.json` and `CURRENT_RELEASE`. With this release, people's agents can use their company's patches through Patchy MCP (#833). | Change | PRs | | --- | --- | | New: Your AI agent can use your company's tools | #873, #878, #880, #881, #882, #883, #884, #886, #887 | | New: Admins choose whether agents can use the company's tools | #871 | | Improved: Your machines shows your agents too (Revoke all machines is now Disconnect everything) | #885, #879 | | New: See what agents can do with a tool | #876 | | New: The log says when an agent made a change | #888 | | New: Your agent can make a tool ready for agents | #869, #870, #872, #875, #896 | | Behind the scenes: agents' calls have their own limits, and a server only an agent uses rests a minute after its last call | #889, #892 | | Behind the scenes: New and Improved changes are public, for patchyhq.com | #893 | | Behind the scenes: library updates | #899 | Five merged PRs get no line: - #874 is release 16's own entry. - #894 is dev tooling: worker agent launchers and scenario data. Its one CLI fix lets a `patchy` installed outside a tier 2 repo publish it. The skills have agents use the repo's pinned `pnpm patchy` instead, so that path is off the documented one. - #900 is CI. - #901 rewords an internal skill. ## Look at - **The entry**, at the top of `releases` in `packages/core/src/whatsNew.ts`. - It names only Claude Code and Codex. Both have connected through real consent against dev instances. Hosted clients (Claude.ai, ChatGPT) are checked in production only (`docs/product.md` › Patchy MCP › Acceptance). - Its labels are the pages' own: Agent access on Company, Your machines, What agents can do, Disconnect everything, and "Jordan Lee via Claude". - **Rollback safety, from the live commit `e4243ff` to `5dd94f3`.** - No PR in the range is labelled `one-way`, and every PR answers both Release impact questions with "Yes". - Migrations 0020–0025 are all additive: - three defaulted or nullable columns on `companies`; - `agent_name` on the runtime log, with a widened `credential_kind` check; - the agent connection tables, `agent_consents` and `change_keys`; - two columns on execution bindings. The new tables reference `users` without a cascade, but no release deletes users or companies. Release 16 reads the runtime log only for credential kinds it knows, so rows from agents can't break it. - `rollback-rehearsal` on #892 rehearsed the whole stack, since #892 adds the last migration and the rest of the stack sits below it: `Exercised rollback paths passed: e4243ff → c8bede4 → e4243ff → c8bede4, in 238s.` #896's run skipped, because it changes no migration or handler descriptor. - #883 turns on the load balancer's host header preservation, which the Deploy workflow's app stack deploy applies. A rollback leaves it on. That's harmless, because release 16's server never reads `Host`. - A rollback takes `/mcp` and `/whats-new.json` away. Connected agents get a 404 until this release returns, and then their connections work again, unless one ended in between. Agent tools published in between stay refused to pages, because #837 already shipped in release 16. ## How it was verified - `pnpm check` on `2d528b1`: format, lint, typecheck and synth passed. In the test step, 2,300 of 2,301 tests passed. The one failure was `packages/sdk/src/install.test.ts` › "says how to reach patchy when the prefix's bin is not on PATH", which timed out at 180 s while the shared machine was loaded. Rerun alone, that file passes all 7 tests in 62 s. The release's own tests pass too: `whatsNew.test.ts`, `schemas.test.ts` and `WhatsNewPages.test.ts`. - The live commit was pinned from `/healthz/deep`: `e4243ff`, release 16. The Deploy run updated last succeeded, and none is unfinished. - Each PR in the range was read with `gh pr view`, including its Release impact answers. ## Release impact - [ ] **Breaking** — requires action from anyone already running this - [x] **Not breaking** — no action required This PR changes only the changelog text and the `patchy` version. As with every release, a CLI installed before this deploy is told to upgrade. - **What does a revert leave behind?** Nothing. People whose seen marker reached 17 would just see no new release. - **Does the release before it still work with that?** Yes. If this release misbehaves, roll back to `e4243ff54d2acbbc88b60eeb0cf9b82a26dc9d5d` (release 16). Prepared by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
Stacked on #894 (ticket #859); merges with the rest of #833's stack, not alone.
What changed
The skill test on the prototype shaped
patchy-server's "The agent area", but it couldn't exercise theagent/folder, read-only actions, change keys,patchy dev agentor the result caps. This repeats it on the stack's own build. There were six builder runs, Claude Sonnet 5.5 and Opus 5.5 on the same three requests, and a Sonnet 5.5 worker agent used each published patch through/mcp.Every builder made a working agent area from the skills alone, and every worker task succeeded. Three things in the text were wrong or missing, and the skill now fixes them:
Closes #860
Look at
1. The three edits, all in
packages/sdk/skills/patchy-server/SKILL.md› The agent area. The section goes from 708 to 825 words. The last two rows came after acceptance (see below). The global skill andpatchy-loopare unchanged, soskills-lock.jsonis too.<instance>/company."<instance>/company; a publish with agent tools warns while it is off, and says nothing when it is on."<instance>/company. Access was already on, and publish (PatchesApi.agentAccessWarnings) warns only while it is off. The fact they were missing was how to tell.id,createdAtandupdatedAt…"retryAfterSecondsand change keys.catto a file and shows only a preview. Opus read the saved file whole, but Sonnet read line ranges.sonnet-r1read lines 340–400 of the skill and stopped at the end of the descriptions paragraph, one paragraph before the result facts. ItslistCallsreturns up to 1,000 whole rows with no paging, at about 370 characters a row. That passes 100,000 characters at around 270 logged calls. In the prototype, a facts-only Sonnet run also returned whole rows.HandlerErrorwhose code is inerrors; anything else a tool throws ishandler_failed, with its message left in the patch's log."throw new Error(...). Its worker got a barehandler_failedwith a correlation id instead of the entry-by-entry refusal its description promised. "Results and failures" says undeclared codes becomehandler_failed, but the agent area never said a plain throw hides its message from the agent. The other five Sonnet builds, four of mine and the first acceptance's, all used a declaredHandlerError. The descriptions paragraph is now split in two: what an agent knows, then the build rules.2. The runs. Each run records the ticket's list. Kinds are what
open_patchreports. Sizes are UTF-8 characters of the door's answers.patchy dev agentbefore publishinitlistCalls(read),logCalls(change), both re-exported fromserver/invalid_calls: all or nothing, by position; duplicates skipped)logCalls, up to 100 callsopen_patch3.1 K;logCalls57.listCallsreturns up to 1,000 whole rows, unpagedinitlistAvailableEquipment(read),lendEquipment(change), its ownalready_outand the date are said;no_such_itemisn't)YYYY-MM-DDtext; the page's is optionalopen_patch2.7 K; list 866 (5 whole rows); loan 296initsalesSummary(read), a read-only action re-exported fromserver/bad_rangebut doesn't say whenopen_patch2.6 K; summary 1.5 K (top 10, fixed)initfindCustomerCalls(read),logCustomerCalls(change),updateFollowUp(change), its ownlogCustomerCalls, up to 200 callsopen_patch7.1 K; log 506; reads page 50 rows with a cursor, about 23 K a pageinitlistFreeEquipment(read),recordLoan(change), its ownYYYY-MM-DDtext; also refused for agents in the shared helperopen_patch2.1 K; list 471 (compact); loan 180initsalesSummary(read), its own read-only action beside the page'sinvalid_range)open_patch5.9 K; summary 2.0 K (top 1–50)Across runs:
patchy init --tier 2first. The prototype's Sonnet started the call log at tier 1, before the global tier line said agents need tier 2.patchy dev agent. Every builder called its own tools before publishing. The three Opus runs also called them as the colleague.ctx.agent. Builders tag agent writes (sonnet-r1, sonnet-r2, opus-r1, opus-r2) and log agent reads withctx.log(both sales runs).ctx.agentin page handlers no tool exports. No agent reaches those, and Opus called it a backup. It does no harm, so I left the text alone.ctx.logs its own changes, which Patchy logs already. That's one run in six, against two of eight in the prototype; no edit.t.text(); that's A handler argument can't be typed as a table's row id, so id-taking handlers cast #832.3. The worker checks. Each was a Sonnet 5.5 worker from the environment's
worker-claude, signed in as Ben (a member) through consent, with no built-in tools. The task named the patch.find_patches,open_patch,change_patchlogCalls, relative follow-ups resolvedfind_patches,open_patch,change_patchlogCustomerCallsfind_patches,open_patch,read_patch,change_patchfind_patches,open_patchfind_patches,open_patch,read_patch,change_patchfind_patches,open_patchopen_patch,read_patchopen_patch,read_patchEvery worker needed nothing outside the door. The ids it used came from the patch's own list. It said how it read "Friday" (the 30th, a week out). Twice, Claude Code itself answered the first
open_patchwith "No such tool available" before loading the tool; that was the client, not Patchy.After acceptance
The first acceptance run, at df79c67, was a FAIL. Acceptance's Sonnet built the call log's read as up to 200 whole rows with no cursor, and its handler accepts summaries of up to 2,000 characters. With 58 such valid calls the read was
too_large(120,012 characters).95ea886 then made two facts concrete: that the cap counts every row's text, with 50 rows of 2,000 characters reaching it, and that publish says nothing when access is on. Sonnet ran request 1 twice more on that text:
findCalls: the newest 100 whole rows with no cursor, summaries capped at 1,000 characters, and "Returns at most 100." in its description. After 300 realistic calls (about 100-character summaries), the read returned 100 rows in 38,684 characters. At 100 summaries near their 1,000-character maximum it would pass 100,000. On access, it said publish gave no warning, "so it may already be on".Stating the facts doesn't get Sonnet to size a read for its longest valid rows. The chief of staff's call, which Allison can overturn, is that the text stays facts with no recipe sentence. Builder reads that pass the cap under worst-case rows are a known limitation tracked in #897, with the candidate fixes listed there.
The second acceptance, at 95ea886, was also a FAIL, on a different defect in its Sonnet call log. Validation used a plain
throw, so a worker sending an impossible date gothandler_failedand a correlation id, not the refusal the description promised. Thetoo_largecheck passed as the #897 limitation: the refusal named the cap and the owner, and said paging is the fix. Everything else passed, including the worker tasks, change keys, consent and endings, the access switch and the rehearsal. The refusal fact above is the fix.The third acceptance, at 0ce7c1c, is a PASS with notes. It classified each defect in a generated patch as a fact gap in the text or a builder slip despite the fact. It found no fact gap and no Patchy defect. Sonnet's batch mutation now refuses a bad date with its declared code (
invalid_call,from: patch, with the entry's index and reason). The builder slips it noted:too_largenames the cap and the owner, and says paging is the fix.handler_failed. Batches of 20 succeeded.How it was verified
Method. Both phases ran on this branch at 33b5445, with each model on a fresh
pnpm dev up(team, so no other company's patches beside them). Ada (admin) turned agent access on and connectedpostgres/orders. That's a throwaway database in a non-production Neon project: 40 invented customers and 1,500 invented orders, read through a new read-only role. The instance accepts only public TLS sources, so a local Postgres couldn't stand in.<env>/agent -p --model claude-{sonnet,opus}-5-5 --no-session-persistence "<request>". That's the launcher's isolation from A dev environment's agent makes new patches in your real ~/Patchy #829 (no ancestor instruction files, no memory,--strict-mcp-config). A probe found only the workspace'sCLAUDE.md, the Patchy skill and Claude Code's built-in skills. To match the prototype, I added its extra allowed commands:cd,cp,mv,curl,echo,sleep,timeout,chromium,python3andsed. Two builders ran at a time, R1 and R2 together, then R3.CLAUDE.mdsays where:open_patchwas recorded through the door with a minted connection.Safety.
~/Patchyand~/.patchy. I checked both before the first run and around each run. Each run's before and after listing of~/Patchy(outsidenode_modules) matched.~/.patchy's skill copy was rewritten. Both happened at 01:10–01:14, during the pause for the demo, while none of my runs was going.~/Patchy'snode_moduleschanged size during one run. They are hard links into the shared pnpm store, which another install's Effect language-service patch rewrote.Tests.
vitest run packages/limits/src/limits-md.test.ts packages/patchy/src/skillLock.test.tspassed (the generated limits block and the global skill's lock), and so didvitest run packages/sdk/src, which includes generation.pnpm verifypassed at 50d7d63: format, lint, typecheck, synth, test, postgres-concurrency, cli-smoke, tier2-smoke and browser. 05c35d5 adds one sentence to the skill. I re-checked it with the limits and lock tests and Prettier, and CI is green on it.Not done. The edited text wasn't put through a second round of builders; the ticket's scale is two models × three requests. All three edits add or move facts the runs showed were missing; none removes one.
Release impact
Skill text only: the project skill a tier 2 repo gets at
init,refreshand dev start.Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).