You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Read-only agents can write files through bash #370
The read-only definitions (reviewer, scout, dream-pass, and review-team reviewer-* definitions) get bash so they can run rg, git log, git show. Their instructions say "use bash for inspection only… never change files", but nothing enforces it: bash can write anywhere the host can.
Evidence
A reviewer run, in the middle of reviewing an extension in a project that is not a git repo, ran:
sed -i '''/const attrsOf/,/return attrs/d'~/.ultimate/extensions/<ext>/server.ts
plus node scripts that rewrote a second file under review, then tried to "restore" them. It deleted the wrong line range and left a stray } (a syntax error) that the coordinator only found by reading the reviewer's transcript, and fixed by hand.
Impact
A "read-only" pass can silently corrupt the code it is judging, and the verdict then describes code that no longer exists. Without git (no worktree, no diff to fall back on), the damage is hard to spot. Since an extension under ~/.ultimate/extensions/ hot-reloads, a bad write takes effect on the live host immediately.
Suggested fix
Give agents without edit/write a bash that cannot write: for example run their commands in a read-only sandbox (on macOS sandbox-exec with a deny file-write* profile, except /tmp; on Linux a read-only bind mount or landlock), or a readOnly flag on the bash tool that the definition loader sets when a definition has no edit/write. A command allow-list (rg, git log, …) is weaker, since git, node and redirections can still write.
A second case, with a bigger blast radius: a read-only dream-pass (instructions: "Read only… Use bash for inspection") wanted to read two git settings and ran
With two arguments git config sets the first key to the second, so it wrote sparseCheckout = core.sparseCheckoutCone into the repository's shared config, the one every worktree uses. From then on every git command in every worktree failed (fatal: bad boolean config value), and Ultimate blocked all tools but message in every branch for about an hour (filed separately as #378: the workspace check reported "missing or unregistered" instead of the git error). The 2>/dev/null hid the only sign at the time. Build af3d8e0e, long-running monorepo session.
Two additions to the suggested fix:
The write sandbox would have caught this: the config lives in the repository's git dir, outside /tmp.
Until then, a one-line hint in agents/dream-pass.md L11 (and the other read-only definitions) costs nothing: "read git config only with git config --get <key>; the two-argument form writes."
Activity
alfonso-noriega commentedon Nov 25, 2026
A second case, with a bigger blast radius: a read-only
dream-pass(instructions: "Read only… Use bash for inspection") wanted to read two git settings and rangit config core.sparseCheckout core.sparseCheckoutCone 2>/dev/nullWith two arguments
git configsets the first key to the second, so it wrotesparseCheckout = core.sparseCheckoutConeinto the repository's shared config, the one every worktree uses. From then on every git command in every worktree failed (fatal: bad boolean config value), and Ultimate blocked all tools butmessagein every branch for about an hour (filed separately as #378: the workspace check reported "missing or unregistered" instead of the git error). The2>/dev/nullhid the only sign at the time. Buildaf3d8e0e, long-running monorepo session.Two additions to the suggested fix:
/tmp.agents/dream-pass.mdL11 (and the other read-only definitions) costs nothing: "read git config only withgit config --get <key>; the two-argument form writes."