Preface: The Unanswered Frontier
In Part 1: Taming the AI Agents, I shared the architectural blueprint of CAMP (Cross-Agent Memory Protocol)—how we used Linux Bubblewrap (bwrap), camp-acpd, OPA policy enforcement, and a central pgvector MemPalace to bring deterministic discipline, sandboxing, and long-term memory to a heterogeneous fleet of AI coding assistants (Claude Code, Google Antigravity, Grok Build, and GitHub Copilot).
At the end of that article, however, I highlighted a significant hurdle: The Headless Limitation.
“While passive A2A works beautifully for structured handoffs, the current frontier of agentic design faces a key limitation: agents are not yet fully headless-capable. They depend on the active terminal session, browser loop, or prompt loop of the user to keep executing. Because agents cannot run completely detached in the background as daemon processes, we cannot yet achieve active A2A communication…”
For weeks, this seemed like an insurmountable impasse. Proprietary AI vendors have zero commercial incentive to ratify a universal, open, cross-vendor Agent-to-Agent (A2A) communication protocol. Each vendor builds its own walled garden (Claude’s cross-session features, OpenAI’s custom ecosystems, etc.). If you wait for the industry to hand you an open interoperability standard, you will wait forever.
Then, on August 26, 2026, inspired by Colin Walters’ article on Agentic AI and software forges and GitHub Agentic Workflows (gh-aw), we had a sudden realization:
We don’t need a new protocol, a new distributed message broker, or permission from proprietary AI vendors. We already have the universal, decentralized communication bus that software engineers have relied on for decades: the software forge itself.
Over the span of 48 intensive hours (from RFC #788 through milestones M1 to M3 and live dogfooding on #813), we designed, implemented, fortified, and verified fully autonomous, headless, cross-vendor Agent-to-Agent swarms running over a local Gitea forge.
Here is how we did it, the architectural hurdles we solved, and why this changes the game for autonomous software engineering.
1. The Core Realization: The Forge is the Bus
When people think about multi-agent swarms, they often imagine complex distributed RPC frameworks, microservices exchanging ephemeral JSON-RPC blobs, or bespoke socket daemons.
In practice, this approach suffers from major flaws:
- No shared context or durable audit trail: Transient network packets vanish unless heavily logged.
- Proprietary CLI fragmentation: Different vendor tools (Claude CLI, Antigravity CLI, Grok CLI, Copilot CLI) do not speak the same internal language.
- Loss of human visibility: When agents talk over private network channels, human operators lose the ability to inspect, pause, or audit the conversation.
By flipping the paradigm and making the software forge (Gitea) the primary communication channel, everything falls naturally into place:
- Issues and Pull Requests are the shared state: The issue description and discussion thread form the canonical, append-only conversation log.
@mentionsare the dispatch triggers: When an agent (or human) writes@grok Please review this PRin a comment, Gitea fires a standard webhook (issue_comment).- Webhooks provide unforgeable authentication: The webhook payload contains the cryptographically verified sender identity. An agent cannot spoof another agent’s identity by merely typing their name in text.
- Every CLI already supports non-interactive prompt mode: The CLIs don’t even agree on the command-line flag—Claude uses
-p, Grok uses-p, Antigravity uses--print, Copilot uses--prompt. But they all agree on the essential contract: “Take a prompt string, execute tools, print output, and exit.”
┌──────────────┐ Gitea Webhook ┌──────────────────────┐
│ Gitea Forge │ ─────────────────────────────> │ camp-a2a-bridge.py │
│ (localhost) │ (issue_comment / assignment) │ (Validates & Files) │
└──────────────┘ └──────────┬───────────┘
▲ │
│ ▼
│ Writes comment / review ┌──────────────────────┐
│ via camp_acp_gateway │ A2A Inbox Ledger │
│ └──────────┬───────────┘
┌──────┴──────────────────────┐ │
│ Fortified Headless Agent │ ▼
│ (bwrap + OPA + MCP sandbox) │ <───────────────── ┌──────────────────────┐
│ • Claude Code (-p) │ Spawn PID │ camp-a2a-dispatcher │
│ • Grok Build (-p) │ (Cold or Resume) │ (Enforces Hop Cap, │
│ • Antigravity (--print) │ │ Rule 1/2, Sandbox) │
└─────────────────────────────┘ └──────────────────────┘
2. Proving Fortified Headless Execution
Before opening the floodgates to background agent dispatch, we had to answer a critical security question: Does a non-interactive, headless agent run with the same strict security sandboxing, audit logging, and tool rails as an interactive session?
On August 26, we probed all fleet launchers on the host with a baseline check:
'Call camp_startup_check and print its result verbatim, then exit.'
The results settled the question immediately:
- Antigravity (
agy --print/ KIR): PASS — Gateway answered, full JSON returned. - Grok (
grok -p/ GRK): PASS — Gateway answered. - Claude Code (
claude -p/ CLD): PASS — Gateway answered. - GitHub Copilot CLI (
copilot --prompt/ CPL): Initially held on TTY tool consent; later unlocked in Milestone 6 via--allow-all-tools --session-id=<uuid>. - Audit Trail: Consecutive audit IDs were recorded in the central ledger: 4574 (KIR), 4575 (GRK), 4576 (CLD).
This proved that a headless run through our fortified pilot launcher (camp_pilot_*.sh) is a first-class, fully audited, sandboxed CAMP agent running inside its Bubblewrap container under OPA policy gates. It is not an unconstrained background script or a degraded bypass.
3. The 3-Tier Memory Architecture
A naive multi-agent dispatch has an immediate flaw: Every time an agent is invoked, it starts from a blank slate (cold start).
If @claude tags @grok to review code, and @grok replies asking for clarification, @claude’s second invocation would normally forget everything it did 5 minutes ago, forcing it to burn thousands of tokens re-reading the entire git history from scratch.
To solve this, we established a clean 3-Tier Memory Model:
┌────────────────────────────────────────────────────────────────────────┐
│ 3-TIER MEMORY MODEL │
├────────────────────────────────────────────────────────────────────────┤
│ Tier 1: CLI Conversation Session (Working Memory) │
│ • Per-(Agent, Repo, Issue) mapping in a2a-sessions.json │
│ • Fast, native, compacted context across multi-turn pokes │
│ • Resumed via --resume (CLD), -r (GRK), --conversation (agy) │
├────────────────────────────────────────────────────────────────────────┤
│ Tier 2: The Gitea Thread (Public Bus & Record) │
│ • Cross-vendor shared truth across Claude, Grok, Antigravity & Human │
│ • Survives process restarts, machine reboots, and dead sessions │
├────────────────────────────────────────────────────────────────────────┤
│ Tier 3: Central MemPalace (Durable Long-Term Knowledge) │
│ • pgvector database (17,000+ drawers across agent wings) │
│ • Structured Knowledge Graph (mempalace_kg_*) for mutable facts │
│ • Attributed AAAK dialect queryable by any agent across any project │
└────────────────────────────────────────────────────────────────────────┘
The BANANA Two-Shot Test
To verify Tier 1 working memory persistence across independent processes, we designed a simple two-shot host test:
- Shot 1 (Create): Dispatch agent headlessly: “Remember the token BANANA-M2. Print ok and exit.” Capture the vendor’s session UUID.
- Shot 2 (Resume): Spawn a completely new operating system process with the resume flag pointing to that UUID: “What token did I ask you to remember?”
Every agent CLI passed with flying colors:
- Grok:
-r 01a03ecc-3ed0-71e1-9a5c-e098bb29ba10answeredBANANA-GRK. - Claude:
--resume 0a587733-9aec-43c5-9cb7-d424e95b2c5bansweredBANANA-CLD. - Antigravity:
--conversation 2e3c43d9-d6fe-4c5c-801b-b9ceb2e7e196answeredBANANA-KIR-JSON. - Copilot:
--session-id <uuid>verified in Milestone 6 (DoD #820).
The dispatcher simply maintains a lightweight JSON mapping ((agent, repo, issue_number) -> vendor_session_uuid). On the first poke of an issue, it creates and saves the session ID; on any subsequent poke on that same issue, it resumes the exact same conversational thread!
4. The Engineering Milestones: From Concept to Production
Building this system required solving several subtle, real-world friction points across multiple agent CLI implementations. Under the guidance of our plan of record (RFC #788), we delivered this through four focused milestones:
Milestone 1 & 1.1: Reliable Headless Spawning
- PR #797 (M1): Configured the dispatcher launch table for all probed CLIs with JSON output formatting.
- PR #800 (M1.1): Eliminated the “queue-behind-live-session” anti-pattern. Originally, if a human had a Claude or Grok TUI open on their desktop, the dispatcher would defer incoming tasks so as not to collide with the live session. We realized that headless tasks must be independent: every Gitea mention spawns an isolated, sandboxed background process tied to that specific issue, allowing concurrent headless work while the human works in their interactive TUI.
- PR #803 (M1.2): Standardized command-line argument parsing for Antigravity (
agy --print <prompt> --output-format json).
Milestone 2: Session-per-Issue Working Memory
- PR #805 (M2): Implemented
a2a-sessions.jsonto store and resume vendor session UUIDs. If a resume fails (e.g. session purged upstream), the dispatcher gracefully falls back to a clean cold start without failing the task.
Milestone 3: Cross-Agent Hops & Crucial Safety Rails
- PR #807 (M3): Enabled agent-to-agent dispatch (Rule 2 reversal). Previously, only mentions authored by
rrs(the human) would trigger execution. With M3, an authenticated comment from@claudementioning@groktriggers Grok’s headless launcher. - PR #811 (M3.1): Set
--permission-mode bypassPermissionsfor headless Claude Code so non-interactive runs execute tool calls without stalling on TTY prompts. - PR #812 (M3.2): Restricted agent summon parsing to line-initial
@logintokens with a non-empty task description (#810), preventing accidental dispatches from passive conversational references.
Milestone 4: Directives, Specification & Living Documentation
- PR #815 (M4): Aligned CAMP fleet directives, architecture specifications, and user documentation with the live A2A implementation.
Milestone 5: Concurrent Dispatching & Hop-Cap Attribution
- PR #816: Stamped hop-cap notices under a dedicated system bridge identity and automatically applied the
needs-humanlabel on held threads. - PR #817 (Threaded Scheduler): Replaced the single-threaded serial dispatcher with a concurrent thread-pool scheduler (#804). Multi-agent dispatches across different issues now execute concurrently in parallel background threads instead of queuing behind long-running tasks.
Milestone 6: Full Fleet Coverage with GitHub Copilot
- PR #819 (M6): Brought GitHub Copilot CLI into the headless A2A fleet (#818). By passing
--allow-all-toolsand pinning minted session UUIDs (--session-id=<uuid>), Copilot achieved full parity with Claude, Grok, and Antigravity, completing 100% headless fleet coverage across all four major AI coding assistants.
5. Hard Safety Rails: Preventing Autonomous Runaway Loops
Letting AI agents autonomously invoke each other in background loops without a human watching is a recipe for an infinite, credit-draining token fire. We put four non-negotiable safety guardrails in place:
Guardrail 1: The Strict Hop Cap
The dispatcher tracks hops per (repo, issue). Each agent-to-agent dispatch increments the counter.
- Hop Limit = 3: A typical review round-trip is 2 hops (Human $\rightarrow$ Claude $\rightarrow$ Grok $\rightarrow$ Claude).
- Automatic Halt on Hop 4: If agents attempt a 4th autonomous hop without human participation, the bridge refuses to launch, posts a diagnostic notice to the thread:
[camp-a2a-bridge] hop cap reached (3 agent-to-agent dispatches on CAMP/camp-infrastructure#813) — not launching GRK for claude's mention, and holds execution until the human (rrs) provides input or resets the count.
[ Human: rrs ] ────── (Cold Start) ─────> [ @Claude ]
│
(Hop 1) │ @grok please review
▼
[ @Grok ]
│
(Hop 2: Resume) │ @claude I reviewed
▼
[ @Claude ]
│
(Hop 3) │ @grok ack hop 4
▼
┌─────────────────────────┐
│ DISPATCHER HOP CAP: 3 │
│ *** BLOCKED & HELD ***│
│ Awaiting Human Reset │
└─────────────────────────┘
Guardrail 2: Deliberate Summon Parsing (M3.2, #810 / PR #812)
In human conversation, we often reference colleagues in passing: “I will talk to @claude about this later” or “See @grok’s table above”.
Early prototypes treated any appearance of @agent as a dispatch trigger, causing accidental, unwanted agent launches!
We instituted a strict Summon Predicate: For fleet agents, a mention is only considered an actionable summon if:
- The
@loginappears as the starting word of a line (optionally preceded by markdown list markers*,-, or>). - It is immediately followed by whitespace and a non-empty task description.
Mid-sentence mentions in discussion paragraphs are parsed as passive conversational text and never trigger background dispatches.
Guardrail 3: Headless Tool Permissions without Weakening Security (M3.1, #809 / PR #811)
In interactive mode, Claude Code presents interactive TTY prompts asking the user to approve MCP tool calls (such as camp_pr_get or camp_pr_get_diff). In unattended headless mode, there is no TTY, causing the run to fail with permission errors.
To fix this, we configured --permission-mode bypassPermissions for Claude’s headless CLI invocation. Crucially, this only bypasses Claude’s internal TTY UI prompt—it does not bypass CAMP’s security rails.
All command executions still route through camp-acpd and Bubblewrap namespaces; OPA policy checks remain active; and privileged operations (such as merging pull requests or restarting system services) still trigger desktop Zenity HITL dialogs on the human’s workstation.
Guardrail 4: The Sovereign Kill Switch (Rule 1)
At any point, the human operator can instantly freeze all background agent dispatches across the entire infrastructure with a single standard Linux command:
systemctl --user stop camp-a2a-active.service
6. Live Dogfooding: Watching the Swarm in Action
On August 27, 2026, on issue CAMP/camp-infrastructure#813, we ran the full live dogfood test of the A2A system.
Here is the exact transcript of what took place entirely autonomously in the Gitea issue thread:
Human initiates:
rrscomments on issue #813:@claude Please start the M3 dogfood. On this issue, post a conversation comment whose first line is exactly: @grok Please review this issue in one short paragraph, then stop.Claude launches (Cold start): The dispatcher spins up
@claudeheadlessly insidebwrap. Claude reads the issue and posts:@grok Please review this issue in one short paragraph, then stop.
(M3 dogfood step 2 — posted by @claude on rrs’s instruction; this is the CLD $\rightarrow$ GRK fleet hop.)Grok launches (Cold start, Hop 1): The bridge intercepts Claude’s comment, identifies the start-of-line
@groksummon, and launches@grok. Grok reviews the issue and replies:@claude I have reviewed this issue. Please confirm and stop.
#813 is a throwaway live dogfood of A2A M3 on 6.git+b78c65cf…Claude resumes (Session Resume, Hop 2): The bridge intercepts Grok’s comment, sees the
@claudesummon, and launches Claude with--resume b398d048-ccc3-4cce-8437-4cf8748881a8. Claude immediately remembers its earlier context without token waste:Confirmed — Grok's review (comment 88562) received via the GRK→CLD fleet hop. That completes the round trip: rrs→CLD, CLD→GRK, GRK→CLD, and this reply. I am deliberately not tagging anyone here, so the chain stops at two agent hops. Stopping.Testing the Hop Cap (Hop 3 $\rightarrow$ 4):
grokprompts@claude Please ack hop four then stop.Claude posts@grok Please ack hop four then stop.(Hop 3). When Grok would have been launched for Hop 4, the dispatcher intervenes:[camp-a2a-bridge] hop cap reached (3 agent-to-agent dispatches on CAMP/camp-infrastructure#813) — not launching GRK for claude's mention.Human Reset & Multi-Agent Wrap-up:
rrssteps in, resets the state, and asks the fleet for final status. In parallel:@grokdelivers a closure scorecard.@claudeconfirms session continuity and M3.2 summon filtering.@priyasi(Antigravity CLI) runs automated ACP checks: 44/44 test suite passing, 17,219 MemPalace vector drawers active, zero spec drift.@agrickxy(Antigravity CLI) provides comprehensive infrastructure impression analysis.@kiran(Antigravity CLI) is summoned headlessly to draft this very blog post!
7. The Ergonomic Breakthrough: The Forge as the Unified Mindmap & Interface
Beyond backend plumbing and sandboxing, routing agent interaction through Gitea fundamentally revolutionizes the developer experience of managing an AI fleet.
The “Mindmap” Mental Model: Threaded Conversations & Forking Tasks
In traditional CLI tools, conversations are constrained to a single, linear terminal scrollback. When an agent discovers multiple sub-problems, exploring them sequentially in one prompt loop rapidly pollutes the context window and confuses the model.
Using the forge as the communication gateway naturally unlocks a mindmap mental model:
- Forking sub-threads: Complex problems can be split into dedicated child issues or threaded PR reviews.
- Focused execution scopes: An agent can be summoned to solve a narrow sub-task in its own issue thread without derailing the parent architectural discussion.
- Structured problem decomposition: The forge issue hierarchy maps 1:1 to the developer’s mental map of the project.
Eliminating Terminal UI Fragmentation
Anyone using multiple AI coding assistants on a daily basis quickly grows exhausted by their jarring terminal UI differences: differing ANSI escape rendering, inconsistent markdown wrapping, erratic diff pagers, and incompatible keybindings across Claude, Grok, and Antigravity.
Gitea homogenizes the entire fleet under a single, polished rich-text web view:
- Syntax-highlighted code blocks and visual side-by-side git diffs.
- Clear author badges attributing each contribution to its exact agent identity (
@claude,@grok,@priyasi,@kiran). - Collapsible
<details>blocks for voluminous diagnostic outputs. - Interactive task lists and markdown tables.
Effortless Context Retrieval, Archival & Data Retention
Auditing past agent decisions in terminal logs or ephemeral chat histories is notoriously difficult. With the forge, every exchange is:
- Contextually bound: Pinned directly to the repository, branch, and commit SHA being modified.
- Organized & Archival-Grade: Full-text searchable with clear milestone and issue tags.
- Topic-Focused: The human operator can review the complete lifecycle of a discussion in seconds, gaining a rapid, holistic grasp on the entire subject.
Reading back through past agent interactions becomes a breeze—to the point where interacting via the intermediary Gitea interface becomes far more pleasant and productive than wrestling with multiple desktop CLI terminals.
Remote Connectivity & Headless Agent Farm Management
Because Gitea provides a standard web and API interface, you are no longer chained to the workstation running the agent processes:
- Monitor progress and dispatch tasks from a mobile browser, tablet, or remote laptop.
- Queue review tasks on the go without requiring active SSH sessions or terminal multiplexers.
- The local agent farm continues working silently in its sandboxed daemon containers.
Quietly Achieving the Holy Grail: Live Cross-Vendor Swarms
For years, the AI industry has treated cross-vendor multi-agent interoperability as an elusive dream waiting for industry-wide API standardization. By recognizing the software forge as the universal message bus, we quietly achieved live, production-grade, cross-vendor communication across completely distinct vendor models.
8. What This Means for the Future of Agentic AI
This milestone marks a fundamental shift in how we interact with autonomous AI systems:
- Heterogeneous Agent Specialization: We don’t have to choose a single “winner” among AI models. We can task Claude Code with architectural refactoring, summon Grok Build for rapid verification and adversarial PR reviews, and deploy Google Antigravity agents for codebase exploration and documentation drafting—all coordinating fluidly in the same PR thread.
- True Human Sovereignty: The human developer is no longer a bottleneck typist or a passive spectator. You act as the Engineering Manager / Lead Architect. You set the requirements on an issue, tag the lead agent, and let the agents iterate, review, and test among themselves in the thread—while hard hop caps, OPA policies, and Zenity HITL gates guarantee that no agent merges code or pushes upstream without your explicit sign-off.
- No Vendor Lock-In: Because the entire coordination fabric is built on standard Git, HTTP webhooks, local Linux container sandboxes (
bwrap), and open MCP tools, any new AI CLI tool released tomorrow can be plugged into our fleet in under 15 minutes by simply adding its command-line prompt flag to the launch table.
We have moved beyond static autocomplete and interactive chat widgets. The software forge is now an active, living, collaborative workspace where humans and autonomous AI agents engineer software together.
9. Video Demonstration: CAMP Forge A2A Swarm in Action
Below is a video demonstration showcasing autonomous multi-agent communication, cross-vendor relay, and headless swarm coordination in action via the CAMP Forge interface:
The Cross-Agent Memory Protocol (CAMP) and MemPalace are developed as part of our ongoing research into secure, sovereign, and disciplined Agentic AI computing.
No Comments Yet
Leave a Comment