Repository navigation
Description
This was generated by AI during triage.
The environment's workspace lives under $XDG_DATA_HOME, which is usually inside the developer's HOME. Claude Code loads CLAUDE.md and .claude/CLAUDE.md from every folder above its working directory, and for HOME itself .claude/CLAUDE.md is the developer's personal instruction file. --setting-sources project doesn't stop it. So the agent the development guide calls "a fresh Patchy user" follows the developer's personal instructions, which skews any check of how agents behave with Patchy.
Found while triaging #592. The #563 prototype hit it first and moved its fresh agents to /tmp to avoid it. Filed by Claude Opus 5.5 in Claude Code, running in T3 Code, for Allison.
Agent Brief
Category: bug
Summary: The agent launcher excludes every instruction file from folders above its workspace, so the environment's agent loads only the workspace's own.
Current behavior:
The launcher starts Claude Code with --setting-sources project in a workspace at $XDG_DATA_HOME/patchy-dev/<label>/workspace. Claude Code still loads CLAUDE.md and .claude/CLAUDE.md from each parent folder, including the developer's ~/.claude/CLAUDE.md. Triage confirmed this on Claude Code 2.1.294: with a sentinel word in a parent folder's .claude/CLAUDE.md, a -p agent quoted it back.
Desired behavior:
The agent loads no instruction file from any folder above its workspace, wherever the environment folder lives. The workspace keeps its own Patchy project skill.
Key interfaces:
- Claude Code's
claudeMdExcludessetting: glob patterns or absolute paths ofCLAUDE.mdfiles not to load (it applies to user, project and local memory). In the same probe,--settings '{"claudeMdExcludes":[<the parent folder's CLAUDE.md and .claude/CLAUDE.md>]}'removed the sentinel. Triage verified passing it through--settings; it did not test the workspace's own.claude/settings.json. - The generated
agentlauncher.
Acceptance criteria:
- With a sentinel in
CLAUDE.mdand in.claude/CLAUDE.mdof a folder above the workspace, an agent started by the launcher reports neither. A one-question-pprobe ("does any instruction file in your context mention a sentinel word?") is enough; say in the PR how it was run. - The workspace's Patchy project skill still loads.
- The development guide's description of the agent matches what it loads.
Out of scope:
- Moving the environment folder out of HOME.
- The agent writing to the developer's HOME and npm prefix (fix(dev): the environment's agent can install into the developer's real HOME #592), and inherited
PATCHY_API_URL/PATCHY_API_TOKEN(fix(dev): the environment's agent inherits PATCHY_API_URL and PATCHY_API_TOKEN from the developer's shell #619).
Activity
fix(dev): the environment's agent ignores the developer's PATCHY_* va…