On this page
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
- Repository entrypoints (
AGENTS.md,CLAUDE.md,CODEX.md,GEMINI.md): Generated duringdecapod initand 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). - Process-level CLI & Decapod-specific structured RPC: Agents invoke
decapod <command>ordecapod 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. - Compatibility by explicit contract, not blanket claims: Agents discover supported operations and extensions at runtime via
decapod rpc --op interop.manifestand negotiate compatibility viadecapod rpc --op interop.negotiateagainst profiledecapod.interop(v1, supporting extensionsreceipts,interlocks,projections, andcontext-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 redacteddecapod://resources over local stdio JSON-RPC 2.0 (2025-03-26,2024-11-05;auto,jsonl, orcontent-lengthframing). Transport defaults to read-only;--allow-mutationsstill 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:
- 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.
- 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.
- Adapter discovery never proves delivery: Listing or calling MCP tools or inspecting an A2A Agent Card never substitutes for exact-candidate
decapod validateproof.
Identity and custody across harnesses
- Local cooperative identity:
DECAPOD_AGENT_IDanddecapod session acquire(DECAPOD_SESSION_PASSWORD) attribute local task claims, workspace leases, and trajectory entries.decapod session handshake --scope <scope>records tamper-evidentidentity_assertions, where environment-supplied agent/provider names remainself-declaredandunverifiedunless 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'sDECAPOD_AGENT_IDlabel 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:
- 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 "..."ordecapod todo yield --id <task-id>). - Second agent resumes without re-explaining everything: Claude Code runs
decapod session acquire, inspectsdecapod todo get --id <task-id>,decapod govern artifacts status, anddecapod 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. - Proof must still be earned on the final commit: Any new edits by the second agent require fresh trajectory updates, checkpoints, and
decapod validateon the resulting commit.
Negative cases & enforcement evidence
| Failure Case | Kernel Behavior | Source / Test Evidence |
|---|---|---|
| Unregistered RPC op | Returns unknown_op without creating .decapod/ or session files. | tests/interop_conformance.rs::unregistered_rpc_is_rejected_before_project_startup |
| Malformed or duplicate JSON keys | Refused 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 claim | Exclusive 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 lease | Claim 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 edits | Prior 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 denial | repository_denied or action_required halts without SQLite fallback; validate requires a valid workspace and accepted target. | tests/cloud_managed_session.rs |