Skip to content

feat(mcp): builder agents call their agent tools locally with patchy dev agent - #875

Merged
allisonmahmood merged 4 commits into
mainfrom
mcp/844-dev-agent
Oct 23, 2026
Merged

allisonmahmood merged 4 commits into
mainfrom
mcp/844-dev-agent

Conversation

@allisonmahmood

@allisonmahmood allisonmahmood commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #873 (ticket #844); merges with the rest of #833's stack, not alone.

What changed

In the skill test, no builder agent could call its own agent tools before publishing, so each told its person the tools were untested. Now patchy dev agent lists a patch's tools as a worker agent sees them, and patchy dev agent <tool> [<json>|-] calls one the way Patchy MCP's door will, against the running patchy dev session, as the dev viewer or the colleague (--colleague). Open dev pages update live.

Closes #844

Look at

1. One call path, the door's shapes (packages/patchy/src/devAgent.ts, packages/api/src/agentTools.ts). Each dev mount answers a nonce-guarded POST /~dev/agent as its own person. The daemon reads the binding once, checks that the tool exists and that its arguments fit the schema on that version, and calls Invocation.callAgent (#843) with ctx.agent { name: "patchy dev" }. A change gets a fresh key: a mutation's becomes its mutation key, which the daemon reuses on a retry of unknown_outcome. An action is never retried. Answers come from the shared module, which gains unknownToolRefusal, invalidArgsRefusal, runtimeRefusal and callAnswer, so the door (#854) shows agents the same words. The agent access switch is never read.

2. The CLI contract (devLifecycle.ts, CliError.ts, ADR-0004). These follow the ticket's exit codes:

  • 0: a result.
  • 2: any refusal the door would give. ADR-0004's failure document gains from, details and retryAfterSeconds.
  • 1: a local problem: not_running, no_agent_tools, or arguments that aren't one JSON object.
  • 3: a started call got no usable answer.

3. Naming the binding (devServer.ts, devResources.ts). Server builds are counted per session, and a call's version is its build. dev.log now says Server build N ready. When the latest rebuild failed, the answer says the last good build answered, in warnings under --json.

A live run on this worktree's dev instance, with a starter tier 2 repo and two tools in agent/notes.ts:

$ pnpm patchy dev agent addNote '{"title":"Call Acme back"}'
{
  "result": { "id": "01a16390-…", "by": "Patchy Dev", "via": "patchy dev" },
  "version": 1
}
Server build 1 answered as Patchy Dev via patchy dev.
[exit 0]
$ echo '{"title":"Send the deck"}' | pnpm patchy dev agent addNote - --colleague
{ "result": { "id": "01a16390-…", "by": "Dev Colleague", "via": "patchy dev" }, "version": 1 }
Server build 1 answered as Dev Colleague via patchy dev.
[exit 0]
$ pnpm patchy dev agent listNotes --json
{"result":["Send the deck","Call Acme back"],"version":1}
[exit 0]
$ pnpm patchy dev agent addNote '{"title":" "}' --json
{"ok":false,"error":"agent-notes refused addNote (blank): give the note a title.","kind":"rejected","code":"blank","from":"patch","details":{"message":"give the note a title"}}
[exit 2]
$ pnpm patchy dev agent addNote '{}' --json
{"ok":false,"error":"addNote's arguments don't fit its schema: Missing key at [\"title\"]. Fix them from its args in open_patch.","kind":"rejected","code":"invalid_args","from":"patchy"}
[exit 2]
# (since review round 1 this refusal also names the tools the patch has now and says to call open_patch)
$ pnpm patchy dev agent create '{"title":"x"}' --json
{"ok":false,"error":"agent-notes has no tool create. Its tools now: addNote, listNotes. Call open_patch to see what each does and takes.","kind":"rejected","code":"unknown_tool","from":"patchy"}
[exit 2]
$ pnpm patchy dev agent addNote '[1]' --json
{"ok":false,"error":"A tool's arguments are one JSON object, such as '{\"name\":\"Acme\"}'.","kind":"local"}
[exit 1]
# listNotes' description deleted, so the rebuild fails:
$ pnpm patchy dev agent listNotes
{ "result": [ … ], "version": 1 }
Server build 1, the last good one, answered as Patchy Dev via patchy dev: the latest rebuild failed. Read `pnpm patchy dev logs`.
# description restored:
$ pnpm patchy dev agent listNotes
{ "result": [ … ], "version": 2 }
Server build 2 answered as Patchy Dev via patchy dev.

The colleague's dev page was open throughout. Before and after patchy dev agent addNote '{"title":"Book the venue for Friday"}' ran as the primary viewer, with no reload in between:

Colleague page before Colleague page after

How it was verified

  • devAgent.test.ts runs on supervised workerd and PGlite, through DevResources as patchy dev builds it. It checks:
    • open_patch's answer;
    • a change as the viewer and as the colleague, each publishing the wake open pages re-run on;
    • a read that sees both, with ctx.agent and the person;
    • the dev settlement naming the agent;
    • the patch's refusal, invalid_args and unknown_tool (the page's own handler isn't a tool), and handler_failed;
    • no_agent_tools for tier 2 without tools and for tier 1.
  • cliDevAgent.test.ts runs the bundled CLI against a stub daemon. It checks the request, both outputs, - and --colleague, the stale build, and exits 0, 2 (with from, details, retryAfterSeconds), 1 (arguments, no_agent_tools, not_running) and 3 (a 500, an unreadable reply).
  • The live run above on pnpm dev, including the open page.
  • agentTools.test.ts covers the shared refusals and callAnswer. devServer, devServerWatch, devExecution, devLifecycle, devLog and all of packages/api pass. pnpm typecheck:tests and eslint pass, and docs/API.md is re-rendered.
  • pnpm verify on cdd420b passes all nine steps: format, lint, typecheck, synth, test (2,090 tests), postgres-concurrency, cli-smoke, tier2-smoke and browser. CI is green on cdd420b. clerk-live hit its 10-minute job cap twice on slow runners and passed on the third run.
  • pnpm test:rollback-rehearsal --live dd3f41f passes. dd3f41f is the main commit with Tier 2 readers accept handler descriptions, read-only actions and agent tools, and enforce them #837 and Deactivation and Disconnect everything end pending device logins and record when a person's credentials ended #838; the run was dd3f41f → cdd420b → dd3f41f. This PR adds no migration.
  • Review: GPT-6.1-Sol (xhigh), two rounds. Round 1 had one blocking finding, round 2 none. Every finding is fixed or dismissed with a reason in the review comment.
  • Acceptance: PASS with notes on cdd420b. It also forced a lost reply after a committed mutation (the retry wrote once) and after an action (it ran once and warned it may have partly happened).

Release impact

  • Breaking — requires action from anyone already running this
  • Not breaking — no action required

A new CLI subcommand and a new route on the local dev daemon. It adds no migration and no instance route. The one changed log line is Server binding ready → Server build N ready in dev.log, and nothing parses it.

  • What does a revert leave behind? Nothing. The command and daemon route go with the release, and no data changes shape.
  • Does the release before it still work with that? Yes.

Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and accepted by GPT-6.1-Sol (xhigh).

@github-actions github-actions Bot added area:server Touches the server area area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area size:xl Over 1,000 changed lines; review in multiple passes labels Oct 22, 2026
@allisonmahmood

Copy link
Copy Markdown
Owner Author

Review: GPT-6.1-Sol (xhigh), two rounds

Round 1, on 117315e: one blocking finding, four should-fix and two nits.

# Finding Outcome
1 Blocking. A patch refusal coded like a lifecycle refusal (patch_retired) matched PatchRetired in the CLI's refusal union and lost from, details and retryAfterSeconds under --json. Fixed in c76773f. The door's refusal now matches first, since no instance refusal has from. cliDevAgent.test.ts uses a patch_retired patch refusal.
2 An action that timed out doesn't say it may have partly happened, and the correlation id its message points to is dropped. Fixed in c76773f. runtimeRefusal adds the warning and the correlation id.
3 A recovered mutation can't report replayed: true. Dismissed. The daemon's retry of unknown_outcome is internal to one command, which made one change. The door's replayed is for an agent retrying with its own key, which patchy dev agent deliberately can't do: there is no --key, and running the command again is a new change.
4 Under --json, fresh answers don't name the build. Dismissed, with the contract documented. The spec says a JSON success is the door's structured result. A call's version is its build, and warnings appears exactly when the last good build answered, so its absence means the newest build answered (README, ADR-0004). Text output always names the build.
5 invalid_args should name the patch's current tools, since a publish may have changed the schema. Fixed in c76773f.
6 Nit: a race between installing a binding and clearing the stale flag. Fixed in c76773f. A failure records the build that was serving, so the install's own build bump ends the warning in the same step.
7 Nit: argument codecs are compiled per request. Dismissed. This is dev-only with one call per CLI process, and Sol measured the cost as small.

Round 2, on c76773f: nothing blocking, two should-fix.

# Finding Outcome
1 Runtime's timeout code (a callback's deadline inside an action) misses the partial-happening warning. Fixed in 0790e3c.
2 A read-only action shouldn't be told it may have written or asked for a new change key. Fixed in 0790e3c. runtimeRefusal takes the tool's descriptor, and the warning goes only to actions that can write.

Separately, a5d8e33 fixes CI's typecheck. The Effect language service refuses JSON.stringify; the #845 lane spotted it. Text answers now encode through Schema.

@allisonmahmood
allisonmahmood force-pushed the mcp/843-runtime-agent-invocations branch from 04f3206 to 3a49456 Compare October 22, 2026 13:21
@allisonmahmood

allisonmahmood commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner Author

Acceptance: PASS with notes

Checked cdd420bd172f7c04d8188e03c616bc0b56c7cb04 (base 3a4945659406b0e01328c0c7f647cd96921d620a, PR #873) on fresh team data with disposable tier 2 Notes and tier 1 fixtures, by GPT-6.1-Sol (xhigh) in the Codex harness, T3 Code.

Done means

  • List tools, read and change as both dev people, watch the page update: passed. The installed release listed five tools in name order, with descriptions, closed argument schemas, results, refusal codes and correct read/change kinds. Queries, read-only actions, mutations and actions ran as Ada Park and Dev Colleague, preserving their admin/member distinction and ctx.agent = { name: "patchy dev" }. Both open pages received all four notes without reloading; their browser markers survived. Stdin arguments and omitted {} worked.
  • Each refusal exits 2 with the door's shape: passed. Checked the patch's own patch_retired refusal, missing/excess arguments, an ordinary page handler that is not an agent tool, and an unexpected handler failure. JSON failures used stderr alone and preserved kind, code, from and patch details. Internal diagnostics stayed private. The CLI suite also checks retryAfterSeconds and exit 3 for unusable replies.
Selected CLI evidence
$ patchy dev agent addNote - --json                 # stdin: {"title":"From Ada Park"}
{"result":{"person":"Ada Park","agent":{"name":"patchy dev"}},"version":1}
[exit 0]
$ patchy dev agent addNote - --colleague --json     # stdin: {"title":"From Dev Colleague"}
{"result":{"person":"Dev Colleague","agent":{"name":"patchy dev"}},"version":1}
[exit 0]
$ patchy dev agent addNote '{"title":" "}' --json
{"ok":false,"error":"acceptance-agent refused addNote (patch_retired): Give the note a title. Details: {\"field\":\"title\"}","kind":"rejected","code":"patch_retired","from":"patch","details":{"message":"Give the note a title","field":"title"}}
[exit 2]
$ patchy dev agent readNotes --json                 # after repairing a failed rebuild
{"result":{"person":"Ada Park","admin":true,"agent":{"name":"patchy dev"},"titles":["Action by Ada Park","Action by Dev Colleague","From Ada Park","From Dev Colleague"],"marker":"second"},"version":2}
[exit 0]

Colleague page before the calls:

Empty colleague page

The same open page after both people's mutation and action calls:

Colleague page updated live

Additional risks

  • Lost replies: passed. A temporary acceptance test used the supervised-workerd/PGlite fixture and an alternate Invocation service to return unknown_outcome after a real committed mutation. The retry reused the identical request/key and wrote once; another call got a different key and wrote another row. An action whose committed reply was lost ran once, returned unknown_outcome, and warned it may have partly happened. Final stored rows proved both counts. 1 test passed.
  • Rebuilds: passed. Removing a required description retained build 1 and returned the warning about the last good build on successful calls and refusals. Repairing it installed build 2, returned new code and cleared the warning. Removing all exports returned exit 1, no_agent_tools; restoring them recovered.
  • Local boundaries: passed. Missing/wrong nonce returned 404; a malformed request with the correct nonce returned 400; POST /mcp returned 404. Calls succeeded while the fresh company's agent-access switch was false. Tier 1 returned exit 1, no_agent_tools; a stopped daemon returned exit 1, not_running; malformed/non-object JSON returned exit 1; interruption while reading stdin returned 130. Text output named the build and person, and text logs attributed calls via patchy dev.
  • Mirrored surfaces: checked. Shared refusal shapers and API docs, CLI help/README/ADR-0004, dev-loop documentation/skill, glossary and both SDK skills match the command. No migration, company-resource caller, package layout change or served product-page change is introduced.

Golden journeys

  • Tier 1 live tools and tier 2 tools: passed. The browser and packed tier 2 suites exercise both runtimes; the direct Notes check above additionally proves agent writes wake both dev viewers.
  • Publish a page, share/unshare, and log a machine in: passed. The packed CLI suite exercises publishing, company/public sharing and the login handoff, covering the shared CLI failure-output changes.

Validation

Local pnpm verify: format, lint, typecheck, infrastructure synth, Postgres concurrency (28 tests), packed CLI, packed tier 2 and browser (81 cases) passed. The offline suite passed 2,089 of 2,090 tests; its sole failure is the environment issue below. The focused installer case then passed with the same Node version in an isolated executable directory (1 passed, 6 skipped). The additional lost-reply acceptance test passed. All current CI checks, including live Clerk, pass on this head.

Rollback answers: match the diff. This layer adds a CLI command and local daemon route, with no migration or production data-format change. A revert leaves no new persistent production state requiring one-way. The CI rollback-rehearsal check passed its scope check and skipped the actual rehearsal because this layer changes neither migrations nor handler descriptors.

Not run

  • Live Clerk was not rerun locally; I relied on the passing CI clerk-live check for this head.

Notes

  • pnpm verify exited 1 because the installer test assumes Node's directory contains no existing patchy. This machine has one, so the installer correctly reported that another copy comes first on PATH, while the test expected “not on PATH.” Both the test and installer are byte-identical to the PR base. The same focused case passed using a temporary directory containing the same Node binary and npm, with no global patchy; the daily-driver installation was untouched. This is an limitation of the acceptance environment, not a failure introduced by feat(mcp): builder agents call their agent tools locally with patchy dev agent #875.

All instances, patch sessions and browser tabs started for this run were removed. The PR's code, branch, body and labels were left unchanged.

@allisonmahmood
allisonmahmood force-pushed the mcp/843-runtime-agent-invocations branch from 3a49456 to a89e676 Compare October 23, 2026 02:08
@allisonmahmood allisonmahmood mentioned this pull request Oct 23, 2026
@allisonmahmood
allisonmahmood force-pushed the mcp/843-runtime-agent-invocations branch from a89e676 to fa5e9ea Compare October 23, 2026 12:24
Base automatically changed from mcp/843-runtime-agent-invocations to main October 23, 2026 12:39
… dev agent`

`patchy dev agent` prints what open_patch would answer for the running
dev binding, and `patchy dev agent <tool> [<json>|-]` calls one tool the
way Patchy MCP's door would: through Runtime's agent invocation, as the
primary dev viewer or the colleague with --colleague, with ctx.agent
{ name: "patchy dev" }. Pages open on the dev URLs update live, and the
company's agent access switch doesn't apply.

Each dev mount answers a nonce-guarded POST /~dev/agent as its own
person. The daemon checks the tool and its arguments against the version
it runs, mints a change's key (a mutation's becomes its mutation key,
kept by a retry of an unknown outcome) and never retries an action.
Answers take the door's shapes from packages/api, which gains the
unknown_tool, invalid_args and runtime refusals and the call answer the
door will share. Each answer names the server build that gave it, and
says when a failed rebuild left the last good one answering.

Exit codes follow ADR-0004: 0 for a result, 2 for any refusal the door
would give (its failure document adds from, details and
retryAfterSeconds), 1 for local problems, 3 when a started call gets no
usable answer. README, ADR-0004, DEVELOPMENT, the dev-loop skill and the
patchy-server and patchy-loop skills say how to use it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…code, and Patchy's refusals say what to do

A patch may name its refusal patch_retired, which matched the CLI's
lifecycle refusal first and lost from, details and retryAfterSeconds;
the door's refusal now matches before any instance refusal.

invalid_args names the tools the patch has now, as a publish between
calls may have changed the schema. Patchy's runtime refusals name the
correlation id their message points to, and an action that timed out
or whose outcome is unknown says it may have partly happened.

A failed rebuild now records the build that was serving, so a newer
build installing ends the stale warning in the same step.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Effect language service refuses JSON.stringify in the CLI, which
failed CI's typecheck; the indented text answer now comes from a
module-level Schema encoder.

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

A read-only action can't write, so its timeout no longer asks for a
new change key; and Runtime's own timeout code, from a callback's
deadline inside an action, now gets the warning beside handler_timeout
and unknown_outcome.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@allisonmahmood
allisonmahmood merged commit ec7570d into main Oct 23, 2026
14 checks passed
@allisonmahmood
allisonmahmood deleted the mcp/844-dev-agent branch October 23, 2026 12:53
allisonmahmood added a commit that referenced this pull request Oct 23, 2026
Stacked on #875 (ticket #844); merges with the rest of #833's stack, not
alone.

## What changed

Nothing on a patch's card said what someone's own agent could do with
it. Now the card of a live patch whose current version has agent tools
shows **What agents can do** beside its Overview: each tool in
`open_patch`'s order, its name in code with a Reads or Changes tag, its
description opening in place, then "Connect your agent". With agent
access off, a note naming the admins takes the connect link's place, and
an admin also gets "Turn it on at Company". A patch without agent tools
looks as it does today.

Closes #845

## Look at

### The card with agent tools

The brightline scenario's new-business card, its version 2 published
with an `agent/` folder that re-exports four of its handlers with
descriptions. Before this PR the card looks like new-business in the
before-and-after below: no panel.

**Access on, as Jordan (member), with `addNote` opened**

![The card with the What agents can do panel, access
on](https://github.com/user-attachments/assets/aedbffba-e6ef-412e-99ae-fcaf12108ba1)

**Access off, as Jordan (member):** the note names the admin in place of
Connect your agent.

![The panel with agent access off, as a
member](https://github.com/user-attachments/assets/9f367f65-ac80-4414-a672-905f601563a0)

<details><summary>Access off, as Allison (admin): "that's you" and Turn
it on at Company</summary>

![The panel with agent access off, as an
admin](https://github.com/user-attachments/assets/8d514917-16ce-48d3-91da-28d47d49e7ec)

</details>

**Phones:** the panel drops below the card.

| On, member | Off, member | Off, admin |
| --- | --- | --- |
| ![Phone, access on, as a
member](https://github.com/user-attachments/assets/70179901-5426-4f2d-9af3-af0972999247)
| ![Phone, access off, as a
member](https://github.com/user-attachments/assets/d439b8fa-b821-4b58-abe1-fb55591f4789)
| ![Phone, access off, as an
admin](https://github.com/user-attachments/assets/c15ec69d-2c96-4f36-a51d-0f24276e3687)
|

Playwright full-page captures of this worktree's `brightline`
environment at `2821ae1`. The head `31862c3` is that commit restacked
onto the stack below as it moved, so it renders the same. `pnpm dev
compare` can't show these states: it starts from fresh scenario data,
and scenario patches get agent areas only in #859.

### A card without agent tools looks as it does today

<!-- patchy-dev:compare:jordan -->

#### Before and after, as Jordan Lee (member)

Before is `c76773f` (where this branch left mcp/844-dev-agent) and after
is `2821ae1` (mcp/845-card-agent-panel), both on the `brightline`
scenario, from `pnpm dev compare`.

Every page answered 200 with no browser errors.

##### `/patches/new-business`

**1280px, after**

![After: /patches/new-business at
1280px](https://github.com/user-attachments/assets/8eb73df2-78f4-4a2b-82e9-97710892ca11)

<details><summary>1280px, before</summary>

![Before: /patches/new-business at
1280px](https://github.com/user-attachments/assets/fff1246f-7d33-4ab4-ba3a-6e905f5af561)

</details>

| Width | Before | After |
| --- | --- | --- |
| 390px | ![Before: /patches/new-business at
390px](https://github.com/user-attachments/assets/9946f67b-e4fa-40b7-841b-b92f7d9d87d5)
| ![After: /patches/new-business at
390px](https://github.com/user-attachments/assets/eb4ed526-bbb8-4ba1-99ba-1d1168caf82b)
|

##### `/patches/kudos`

**1280px, after**

![After: /patches/kudos at
1280px](https://github.com/user-attachments/assets/3e303373-ef2b-4eed-8de4-34c2113a64d7)

<details><summary>1280px, before</summary>

![Before: /patches/kudos at
1280px](https://github.com/user-attachments/assets/98194b35-cf9c-453c-8307-299de9c15bd1)

</details>

| Width | Before | After |
| --- | --- | --- |
| 390px | ![Before: /patches/kudos at
390px](https://github.com/user-attachments/assets/d74a1275-8a25-45bd-9de7-f9acd8642de0)
| ![After: /patches/kudos at
390px](https://github.com/user-attachments/assets/eaad2b0b-81f5-478f-bccd-b91901c5390b)
|

<!-- /patchy-dev:compare:jordan -->

### Choices worth a look

- **Where the panel sits.** As in mock C, `card-split` puts the panel
beside the whole card on the Overview tab only, top-aligned with the
breadcrumb; below 960 px it drops under the card. `card-split` is the
one new shell piece (`packages/core/src/html.ts`, `ui-consistency`);
everything else composes `side-panel`, `list-compact` rows with
`details`, `tag`, `note-warn` and `btn`.
- **Access off drops the connect link.** Connecting is refused while
access is off, so the off note takes "Connect your agent"'s place rather
than sitting beside a link that dead-ends. The spec's line for the card
now says so. An admin's note says "that's you" and carries "Turn it on
at Company" (`/company#agent-access`).
- **"Connect your agent" links to `/machines#connect-an-agent`**, which
#853 builds; until then the link lands on Your machines' top. The spec's
card line now names the anchor so #853 uses it.
- **Which tools:** the current version's, through #842's `agentTools`,
so a rollback to a version without tools removes the panel. Retired and
deleted cards have none.

## How it was verified

- `PortalPages.test.ts` › *what agents can do on a socket*: a member,
owner and admin each see the tools in `open_patch`'s order (page
handlers left out, a read-only action as Reads), escaped descriptions
and the connect link; the panel is absent on Versions; with access off a
member sees the admins named and no links, an admin sees "you" and Turn
it on. A second test keeps the card unchanged for a tier 2 patch without
agent tools, a tier 0 page, a patch rolled back to a version without
tools, and a retired patch.
- `pnpm exec vitest run packages/portal packages/core
packages/auth/src/CompanyPage.test.ts`: 196 passed.
- `render.test.ts` › `renderAgentPanel`: each tool's kind and escaped
description, the connect link while on; while off, several admins named
with the viewer first as "you", escaped company and admin names, and
Turn it on only for an admin.
- Desktop and phone captures above, both access states, member and
admin.
- `pnpm verify` on `31862c3`: format, lint, typecheck, synth,
postgres-concurrency, cli-smoke, tier2-smoke and browser passed. Under
load from other lanes' runs (load average about 14), two CLI tests
outside this diff timed out at 30 s, `cliRepoBuild.test.ts` and
`cliRepoDescriptions.test.ts`; both files pass run alone (18 tests).
- Rollback rehearsal against `main`'s `e4243ff`, which has #837 and
#838: `pnpm test:rollback-rehearsal --live e4243ff` passed e4243ff →
31862c3 → e4243ff in 159 s.
- CI on `31862c3` is green. `clerk-live` was re-run once after the
runner's Ubuntu mirror stalled during `apt` and the job was cancelled
before any test ran.

## Release impact

Tick exactly one.

- [ ] **Breaking** — requires action from anyone already running this
- [x] **Not breaking** — no action required: a panel on a page, with no
schema, API, CLI or configuration change.

- **What does a revert leave behind?** Nothing: no migration, no stored
rows, no new route.
- **Does the release before it still work with that?** Yes.

Built by Claude Opus 5.5 (xhigh) in Claude Code on T3 Code; reviewed and
accepted by GPT-6.1-Sol (xhigh).
allisonmahmood added a commit that referenced this pull request Oct 23, 2026
## 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci CI, shared testing infrastructure, development scripts and tooling area:cli Touches the cli area area:docs Touches the docs area area:server Touches the server area size:xl Over 1,000 changed lines; review in multiple passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builder agents call their agent tools locally with patchy dev agent

1 participant