Skip to content

Coding-agent subagents B11: coding-agent integration v1 (MCP server; Claude Code plugin first — hook, statusline, drift warning) #396

Open

Description

@pdettori

Part of the Coding-agent subagents epic (#378). Item B11, milestone B-M2. Depends on A2's transport seam (#381), plus B2 (#387), B5 (#390) and B6 (#392).

Goal

An MCP server, packaged first as a Claude Code plugin, that gives the coding agent structured tools for MOCA subagents, in place of parsing CLI output, while keeping the agent's context small.

Scope

  1. An MCP server over Coding-agent subagents A2: mocactl subagent commands (spawn, subagents, get, watch, approve, follow-up) over today's API #381's client library, with tools spawn, list, get, cancel, approve and follow_up.
    • Outputs stay well under MCP output limits (Claude Code warns above about 10k tokens and truncates around 25k by default). Full text, patches and transcripts go to files, and the tool returns paths plus a bounded summary.
    • The spawn description lists the available bundles with a capability summary (Coding-agent subagents B15: capability manifest per bundle digest #400), so the agent writes prompts that match what the remote agent can do.
    • Waiting stays out of MCP. The skill uses mocactl watch under the Monitor tool, because a blocking MCP call holds up the turn and runs into the tool timeout.
  2. The skill (Coding-agent subagents A4: demo-grade Claude Code plugin (skill, SessionStart hook, statusline) #383) updated for MCP.
  3. The SessionStart hook reads Coding-agent subagents B6: owner-scoped event stream of session and turn state #392's event cursor.
  4. The statusline.
  5. A bundle drift warning when the local .claude digest (computed as /promote --dry-run does) differs from the session's bundle.
  6. Packaging as an installable plugin, with scoped permissions.

Acceptance

  • The stories spawn, detach, observe, gate, reattach, collect and follow up all pass through the MCP tools, with no Bash output parsing.
  • Every tool result stays under 10k tokens, even for a large patch.
  • The drift warning fires after a local skill edit.

Out of scope

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 B11: Claude Code plugin v1 (MCP server, hook, statusline, drift warning)[/-] [+]Coding-agent subagents B11: coding-agent integration v1 (MCP server; Claude Code plugin first — hook, statusline, drift warning)[/+] 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