Repository navigation
docs(dev): the environment's agent runs as the developer, so onboarding checks use a throwaway machine - #702
Merged
Conversation
allisonmahmood
force-pushed
the
fix/619-environment-agent-isolation
branch
from
October 15, 2026 21:43
0bc6e9f to
e55d4a8
Compare
…ng checks use a throwaway machine The `agent` launcher that `pnpm dev up` writes runs Claude Code's commands with the developer's own HOME and npm prefix. Given the portal's setup line, it replaced the developer's global `patchy` and the Patchy skill their own agents load, and `pnpm dev down` undid none of it. The guide described it as starting "with only the Patchy skill" and warned against nothing. Triage chose docs over containment. The development guide, the `patchy-dev-loop` skill and the launcher's comments now say the agent is a Patchy user who has already set up, runs as the developer, and must never be given the setup line or run `patchy setup`. "What to exercise for a change" gains a Front door and onboarding entry with a copyable throwaway machine: its own HOME, npm prefix and PATH under /tmp, applied to the agent's commands through CLAUDE_ENV_FILE so Claude Code keeps the developer's login. Closes #592 Co-Authored-By: Claude Opus 5.5 <[email protected]>
allisonmahmood
force-pushed
the
docs/592-agent-runs-as-developer
branch
from
October 15, 2026 21:52
1eb1efa to
9107225
Compare
allisonmahmood
added a commit
that referenced
this pull request
Oct 16, 2026
…u when they fail (#720) Release 13's What's new entry, written from `c9b8fc4`, ahead of deploying it. `patchy` and `CURRENT_RELEASE` move to `0.13.0`, so CLIs and patch repos installed before this deploy are told to upgrade. | Change | PRs | | --- | --- | | New: Home puts the patches you use first | #713, #716, #719 | | New: Every patch in one list | #715 | | Improved: Each patch's page leads with Open | #717 | | New: See when your tools are failing | #718 | | Fixed: Everyone has a name | #687 | | Improved: Your company's look is easier to get right | #697, #696, #703, #688 | | Improved: Forms follow your look's error states | #691, #692 | | Improved: Clearer answers when a publish goes wrong | #686, #685, #689 | | Fixed: Your agent's Patchy commands are steadier | #695, #704, #680, #681 | | Behind the scenes: stricter checks on static pages and tools' database requests; malformed requests are logged | #682, #693, #683 | | Behind the scenes: usage numbers count every publish, sharing change and restore | #698, #699, #700, #690 | | Test and tooling only, no line | #705, #702, #701, #694, #684, #607 | Made by Claude Opus 5.5 in Claude Code, running in T3 Code. Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #701.
The
agentlauncher thatpnpm dev upwrites runs Claude Code's commands with the developer's own HOME and npm prefix. Given the portal's setup line, the environment's agent replaced the developer's globalpatchyand the Patchy skill their own agents load (~/.patchy/skills,~/.agents/skills,~/.claude/skills), andpnpm dev downundid none of it. The development guide described the agent as starting "with only the Patchy skill" and warned against nothing.The fix
Triage chose docs over containment: giving the agent its own HOME would move where pnpm, mise, Playwright and git find their files, and the environment's agent is the wrong place to test onboarding anyway.
patchy-dev-loopskill and the launcher's comments now say the agent is a Patchy user who has already set up, its commands run as the developer, and it must never be given the setup line or runpatchy setup./tmp(outside HOME, so no parentCLAUDE.mdloads) with its own HOME, npm prefix and cache, noPATCHY_*, and aPATHof its npmbin, Node's real directory and the system tools.CLAUDE_ENV_FILEapplies it to the agent's commands, so Claude Code keeps the developer's login. A one-line check confirms no otherpatchyis visible first.Tested by hand
I extracted the recipe's code block from the doc verbatim and ran it against a live
pnpm dev upenvironment, withPATCHY_API_URLandPATCHY_API_TOKENexported in the outer shell:claudecommand did the same, run headlessly with-pand pre-approvals.echo $HOMEshowed the throwaway HOME. An agent started with the recipe's two flags listed only Claude Code's built-in skills and loaded no instruction files.patchycheck. With a Node whose folder holds my globalpatchy(mise, Node 26), it prints that path. With the worktree's Node 24 it prints nothing.~/.claude/skills/patchy,~/.agents/skills/patchy,~/.patchy/skills/patchyand every globalpatchywere unchanged (ls -la,readlink, version and a hash ofdist/index.js).Review
GPT 6.1 Sol (xhigh) found one low issue: under nvm or mise, Node's folder can hold the developer's global
patchy, so the agent could see it before installing. I tried linking justnodeandnpminto the machine instead, but mise'snpmis a launcher that locates itself by its own folder and broke. So the recipe keeps Node's real folder and adds the check Sol suggested. Sol found no other correctness, surface or scope problems.Surfaces
From "Hit every surface", the dev loop entry applied:
docs/DEVELOPMENT.md, thepatchy-dev-loopskill and the runner's launcher comments. Nothing else describes the environment's agent.Closes #592
Made by Claude Opus 5.5 in Claude Code, running in T3 Code.