Skip to content

Coding-agent subagents B12: patch safety and remote verification #399

Open

Description

@pdettori

Part of the Coding-agent subagents epic (#378). Item B12, milestone B-M3. Depends on B9 (#397) and B10 (#398).

Goal

Nothing a subagent returns runs on the user's laptop without review. Subagent results flow into the most privileged process there is: the user's local coding agent (Claude Code, say), often in bypass-permissions mode or its equivalent.

  • Returned text can carry prompt injection from whatever the subagent read.
  • A patch that touches .claude/settings.json, hooks, Makefile, package.json scripts or .pre-commit-config.yaml runs locally at the next make test or pnpm install. That undoes the sandbox.

Scope

  1. Client (the plugin, Coding-agent subagents B11: coding-agent integration v1 (MCP server; Claude Code plugin first — hook, statusline, drift warning) #396):
    • a path policy that flags or refuses changes under .claude/, .github/, .pre-commit-config.yaml, Makefile, package scripts and git hooks;
    • apply only into a git worktree;
    • never auto-apply;
    • returned text marked as data.
  2. MOCA: a "verify" leaf (converge) that runs the project's tests on the patched ref inside a sandbox and returns a verdict. It runs next to the patch, not on the laptop.

Acceptance

  • A patch that touches .claude/settings.json is stopped for explicit approval.
  • Verification runs remotely, and its verdict is shown next to the patch.
  • No local command runs on patched code before review.

Working conventions (for a fresh session)

  • Workspace: git fetch, then create a worktree from rossoctl/main (never local main), under .worktrees/. Populate and build pi-fork (git submodule update --init --recursive && cd pi-fork && npm ci && npm run build), then pnpm install. A worktree without the pi-fork build does not typecheck.
  • Plans: write the plan with superpowers:writing-plans into docs/plans/<date>-<slug>.md. Plans are gitignored and never committed. Write it in chunks, one append per task.
  • Pre-flight table: list every process entrypoint, systemd unit, env example and shell/Go launcher whose boot contract changes, not only TypeScript call sites.
  • Tests: Redis on 6379 must be up. Use each package's own node_modules/.bin/vitest. vitest can exit non-zero with every test green, so grep the log for Errors. Redirect long output to /tmp/kagenti/.... make lint skips untracked files.
  • Commits: git commit -s with Assisted-By: Claude (Anthropic AI) <[email protected]>, never Co-Authored-By.
  • Shared KVM rig: alert the owner before using it, record a manifest of what you install, and verify cleanup.
  • Don't push or open PRs without the owner's go-ahead.

Activity

  1. added
    enhancement
    on Sep 30, 2026
  2. changed the title [-]Claude Code subagents B12: patch safety and remote verification[/-] [+]Coding-agent subagents B12: patch safety and remote verification[/+] on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions