Decapod Docs
Edit on GitHub

BYOA & Interoperability

Decapod is built for Bring Your Own Agent (BYOA) workflows. An engineering team does not have to standardize on a single AI IDE, proprietary chat UI, or central orchestration daemon. Codex, Claude Code, Cursor, Antigravity, and custom harnesses all interact with the same repository kernel through the same CLI and structured RPC contract.

How heterogeneous agents bind to one repository

  1. Repository entrypoints (AGENTS.md, CLAUDE.md, CODEX.md, GEMINI.md): Generated during decapod init and refreshed across upgrades so any supported harness opening the repository sees the same governance contract (decapod eval, decapod docs ingest, decapod session acquire, decapod todo claim, decapod workspace ensure, decapod validate).
  2. Process-level CLI & Decapod-specific structured RPC: Agents invoke decapod <command> or decapod rpc --op <op> --params <json> (or --stdin, or authenticated loopback --http-server). Every call is ephemeral and exits on completion; durable state stays in .decapod/ and Git.
  3. Compatibility by explicit contract, not blanket claims: Agents discover supported operations and extensions at runtime via decapod rpc --op interop.manifest and negotiate compatibility via decapod rpc --op interop.negotiate against profile decapod.interop (v1, supporting extensions receipts, interlocks, projections, and context-capsule).
decapod rpc --op interop.manifest --params '{}'
decapod rpc --op interop.negotiate --params '{"profile_version":"v1","required_extensions":["receipts","interlocks"]}'

The manifest (src/decapod/core/interop.rs) separates implementation status from verification state: static source coverage maps default to not_run, and interop.manifest explicitly declares that it describes capabilities rather than authorizing actions or proving live conformance.

Bounded protocol and harness adapters (MCP, A2A, Harness CLI)

In addition to the CLI and decapod rpc, the current binary ships three bounded, daemonless interoperability adapters that preserve repository-local authority:

  • Local stdio MCP adapter (decapod mcp serve|schema|config): Exposes 6 typed tools and 4 redacted decapod:// resources over local stdio JSON-RPC 2.0 (2025-03-26, 2024-11-05; auto, jsonl, or content-length framing). Transport defaults to read-only; --allow-mutations still enforces session authentication and .decapod/workspaces/* worktree custody. See Model Context Protocol (MCP) for exact tool/resource contracts and version-qualified host configuration guidance (including Grok Build).
  • Bounded A2A card, handoff validator, and opt-in loopback adapter (decapod a2a card|handoff|serve|send): Advertises only executable local governance skills, reports core A2A framing separately from Decapod governance extensions, and validates bounded handoff envelopes fail-closed against local repository ground truth (imported_authority_granted: false). The opt-in authenticated loopback HTTP adapter (decapod a2a serve / send) remains bounded (INV-DAEMONLESS) and non-authoritative; Decapod does not ship a persistent hosted A2A task server.
  • Conflict-safe harness packaging (decapod integration harness matrix|generate|install|status|update|remove|rollback): Emits an honest 6-host compatibility matrix (codex, claude-code, antigravity, opencode, grok-build, pi) and installs or rolls back host discovery configs without clobbering unrelated user settings.

Across all three surfaces, Decapod preserves three hard distinctions:

  1. Local protocol conformance is not live vendor-host activation: Passing local stdio/HTTP adapter tests does not by itself prove end-to-end activation inside a specific third-party host CLI or IDE.
  2. Cooperative host hooks are not security boundaries: Host hooks can be disabled, bypassed by direct shell/git execution, or fail open on errors; final enforcement remains in Decapod's kernel custody gates, OS/container isolation, and Git/forge branch protection.
  3. Adapter discovery never proves delivery: Listing or calling MCP tools or inspecting an A2A Agent Card never substitutes for exact-candidate decapod validate proof.

Identity and custody across harnesses

  • Local cooperative identity: DECAPOD_AGENT_ID and decapod session acquire (DECAPOD_SESSION_PASSWORD) attribute local task claims, workspace leases, and trajectory entries. decapod session handshake --scope <scope> records tamper-evident identity_assertions, where environment-supplied agent/provider names remain self-declared and unverified unless backed by a trust root.
  • Cloud-backed identity (repo.backend = "cloud"): Task custody routes through Dactyl to a hosted service that independently verifies the authenticated account and repository permission on every request; copying another agent's DECAPOD_AGENT_ID label never grants cloud repository access (see Cloud sign-in and task access).
  • Shared durable custody: Because plans, claims, trajectories, living specs, and validation receipts live in .decapod/governance.json, .decapod/managed/specs/*, and the todo store, switching harnesses never strands context inside a closed chat window.

Concrete journey: switching agents mid-task

Suppose one engineer starts a change in Codex, stops midway, and continues in Claude Code or Cursor on the same repository:

  1. First agent leaves durable state: Codex claimed <task-id> (decapod todo claim --id <task-id>), entered .decapod/workspaces/<worktree>, recorded scope/checks in .decapod/governance.json, and either yielded or handed off (decapod todo handoff --id <task-id> --to claude-code --summary "..." or decapod todo yield --id <task-id>).
  2. Second agent resumes without re-explaining everything: Claude Code runs decapod session acquire, inspects decapod todo get --id <task-id>, decapod govern artifacts status, and decapod infer orientation --task-id <task-id> (claiming or accepting the handoff if needed). It immediately sees the accepted intent, modified files, unresolved obligations, and any prior failed checks.
  3. Proof must still be earned on the final commit: Any new edits by the second agent require fresh trajectory updates, checkpoints, and decapod validate on the resulting commit.

Negative cases & enforcement evidence

Failure CaseKernel BehaviorSource / Test Evidence
Unregistered RPC opReturns unknown_op without creating .decapod/ or session files.tests/interop_conformance.rs::unregistered_rpc_is_rejected_before_project_startup
Malformed or duplicate JSON keysRefused before interop.negotiate or RPC dispatch; never silently drops a required extension.tests/interop_conformance.rs::malformed_rpc_parameters_cannot_drop_required_negotiation
Conflicting task claimExclusive claim by Agent A blocks Agent B unless handed off, yielded, or expired.tests/unit/core/fleet_coord_tests.rs, tests/todo_enforcement.rs
Expired custody leaseClaim lease expires after --lease-seconds unless renewed (decapod todo renew); expired leases are surfaced by decapod todo fleet.tests/unit/core/fleet_coord_tests.rs::lease_expiry_and_reclaim_rules
Stale proof after editsPrior validation receipt no longer satisfies current commit; decapod validate must pass on the new commit.tests/interop_conformance.rs::stale_evidence
Inaccessible repo or Cloud denialrepository_denied or action_required halts without SQLite fallback; validate requires a valid workspace and accepted target.tests/cloud_managed_session.rs