From Buzz Message to Landed Code in 13 Seconds: Sovereign Fleet on Nostr
On 2026-11-12 at 18:36:55, I posted a single message into the “Sovereign Fleet” channel on our self-hosted Buzz workspace relay. The message reported a bug in a demo repository (fleet-buzz-demo): add() in calc.py was subtracting instead of adding, and tests/test_calc.py had one passing test and one failing test.
At 18:37:16, twenty-one seconds later, an autonomous coding agent replied in the thread with its own Nostr key: the task was queued as task-1794505036182-103816.
At 18:37:29, thirteen seconds after pickup, the fleet replied again:
passed its gates on lane local_qwen. Landed on the default branch as 2b8c15b615.
It reacted to the original message with a check mark. The diff was exactly one line in calc.py (a - b changed to a + b). Both unit tests were green. The whole loop, from human message in a decentralized chat room to Landlock-sandboxed execution, deterministic pytest verification, and fast-forward git landing, took thirteen seconds of execution time.
This article explains how sovereign-fleet 0.12.0 integrates with Nostr (both Buzz channel intake and NIP-34 decentralized git collaboration), how the security model separates identities, and the real engineering obstacles encountered while connecting autonomous coding agents to decentralized protocols.
Why Nostr as an Agent Workspace
Most developer workflows for AI agents rely on centralized APIs, webhooks, or issue tracker polling. A REST API is synchronous and requires opening ingress ports. MCP connects tools to an active agent session, but does not provide a durable multi-user room where people and background agents converse. GitHub and Gitea issues work well for asynchronous tracking, but they remain isolated platforms.
Buzz (Block’s open-source workspace protocol on Nostr) introduces a different model: a single, cryptographically signed append-only event log. Every participant, whether a human on a phone, a desktop client, or a background daemon, holds a public-private keypair. Chat channels, threaded discussions, reactions, and git events are all Nostr events.
However, Buzz alone does not solve autonomous execution safety. Goose is embedded in Buzz, but running an agent directly against a workspace without isolation means any hallucinated terminal command or errant file write touches the host system. In addition, an agent claiming that code is fixed does not prove that tests actually pass.
Sovereign-fleet acts as the execution engine behind the room:
- Intake: The fleet monitors Nostr events (Buzz channels or NIP-34 git issues).
- Confinement: When a task arrives, the fleet spawns an isolated git worktree inside a Linux Landlock sandbox (kernel ABI 6 or newer). The agent can write only to that worktree and its own state directories, and can open TCP connections only to a short list of ports, which is how it still reaches the local model.
- Outcome Routing: The task router selects a model lane (in this run, goose driving a local Qwen 3.6 35B model in vLLM on our DGX Spark).
- Deterministic Gates: Before any commit or branch landing occurs, the fleet runs independent verification gates (syntax check, scope check, and pytest test suite). If tests fail, the change is rejected.
- Signed Landing: Once verified, the fleet fast-forwards the default branch or opens a NIP-34 pull request, then signs the completion receipt and thread reply with its own Nostr key.
Interactive Architecture Animation: Buzz, Sovereign Fleet, and Goose
With proposals like Goose Issue #12805 introducing an OS-level shell sandbox inside the interactive coding agent itself, a natural question arises: does an in-agent sandbox make external orchestrators like sovereign-fleet redundant?
The interactive diagram below illustrates why the two layers are orthogonal: Goose is the engine; Sovereign Fleet is the drivetrain and test bench.
- Inner Boundary (Goose #12805): Confines shell commands spawned inside a single interactive ACP or chat session.
- Outer Boundary (Sovereign Fleet 0.12.0): Isolates every job in a fresh git worktree wrapped in Landlock and seccomp before any engine launches, routes tasks across multiple harnesses using outcome scoring and quota budgets, and blocks commits from touching
mainuntilallowed_paths, syntax checks, and offlinepytestgates pass.
In headless Nostr pipelines triggered from Buzz or ngit, both layers compose cleanly without overlap.
Engine vs. Drivetrain: Buzz, Sovereign Fleet & Goose
Interactive execution-boundary comparison: signed Nostr intent to test-gated Git landing
Swipe the diagram sideways to follow the pipeline.
Buzz dispatches signed Nostr intent; Sovereign Fleet routes, isolates in Worktree + Landlock, verifies with pytest gates, and lands code.
A signed Kind 9 channel message or a NIP-34 issue arrives; the fleet verifies the signature and checks the author and the task bounds.
Durable queue resolves dependencies, checks quotas, and picks the top outcome-scored lane across harnesses.
Fleet enforces outer Landlock + Seccomp in an isolated git worktree; Goose (#12805) confines its inner shell + ACP.
Deterministic checks run in the same sandbox before anything lands: allowed_paths scope, syntax, and the task's pytest gate.
Verified commit fast-forwards onto main or opens a NIP-34 PR in ~13s, then answers in the thread with its own key and a check mark.
Goose #12805 sandboxes the shell tool in a single session, without worktrees, multi-model routing, or pre-landing test gates.
Instruction enters a single interactive Goose session directly without a durable task queue or dependency graph.
Goose #12805 confines shell child processes, leaving multi-harness failover and process-wide seccomp unaddressed.
Changes touch the live working directory directly with no isolated worktree, no pytest landing gate, and no audit receipt.
Multi-Key Security and Identity Separation
When agents interact with decentralized relays, key management determines security. Exposing a primary operator key to an automated background process is unacceptable. Sovereign-fleet uses strict key separation across three distinct tiers:
- Relay Owner Key: Configured in the relay daemon configuration. It never enters an end-user client, mobile app, or agent harness. It is used exclusively for relay administration and ownership declaration.
- Operator Admin Key: Used by the operator on mobile (via terminal QR code import) and desktop. This key posts instructions, approves unattended tasks, and participates in discussions.
- Fleet Agent Key: Generated independently for the fleet daemon. The private key resides in a dedicated
0600key file read only by the fleet process at runtime. It authenticates to the relay via NIP-42, signs thread updates, posts reactions, and signs NIP-34 git events.
This design ensures that the fleet’s identity is completely decoupled from the operator’s personal identity (cipherfox) and broadcast accounts (sovgrid, hexabella). If the fleet’s key is ever compromised, only that single agent identity is rotated, without affecting relay ownership or operator access.
The Live Run: Step by Step
To verify the pipeline end to end, we staged a minimal test repository named fleet-buzz-demo. The codebase consisted of two files:
# calc.py
def add(a: int, b: int) -> int:
return a - b
def mul(a: int, b: int) -> int:
return a * b
# tests/test_calc.py
from calc import add, mul
def test_add():
assert add(2, 3) == 5
def test_mul():
assert mul(2, 3) == 6
Running pytest against this repository yields 1 failed, 1 passed.
At 18:36:55, the operator posted the following message into the “Sovereign Fleet” Buzz channel:
Fix add() in calc.py: it subtracts instead of adding.
```fleet
{
"allowed_paths": ["calc.py"],
"gate": {"pytest": "tests/test_calc.py"}
}
```
Three moments of this run are on record, all of them visible in the channel:
18:36:55 the operator posts the message with the fleet block
18:37:16 the fleet replies in the thread: queued as task-1794505036182-103816
18:37:29 the fleet replies: passed its gates on lane local_qwen, landed as 2b8c15b615
Between the second and the third line the fleet did what it does for every task: the router picked the lane local_qwen (goose driving the local Qwen 3.6 35B), a fresh worktree was created and the agent started inside the sandbox, the agent changed one line in calc.py, the gates ran (pytest tests/test_calc.py and the check that only calc.py was touched), and the commit was fast-forwarded onto the default branch. Then the fleet posted its reply and a check mark reaction on the original message.
The 21 seconds before the first reply are mostly the polling interval, which was set to one minute. The 13 seconds after it are the agent turn, the gates and the landing together.
The task ran unattended for two reasons: the author’s public key is listed under authors for this project, and the message carried a valid fleet block with a bounded scope and a gate. Without either, the fleet queues the task for manual approval instead.
Channel Intake Architecture (BuzzTracker)
The channel intake subsystem (src/fleet/plugins/intake.py) polls configured Buzz channels by querying the relay through the buzz CLI.
A Buzz channel message is a Nostr Kind 9 event containing an h tag identifying the channel:
[
"EVENT",
{
"id": "e81f...",
"pubkey": "...",
"kind": 9,
"tags": [
["h", "channel-uuid-here"]
],
"content": "Fix add() in calc.py..."
}
]
The tracker must tell a new top-level message from a reply in a thread, or the fleet would take its own answers, and every comment on a task, for new tasks. In NIP-10 a reply carries an e tag that points to an earlier event. Three shapes matter in practice:
- Marked replies:
["e", "<id>", "<relay-url>", "reply"], and for a direct reply to the first message["e", "<id>", "<relay-url>", "root"]. The first version of the intake looked forreplyonly and took arootreply for a new message. - Positional tags: older clients write
["e", "<id>"]without a marker. - Mentions:
["e", "<id>", "<relay-url>", "mention"]quotes another message. That is not a reply.
The check in BuzzTracker is short:
@staticmethod
def _is_reply(event: Dict[str, Any]) -> bool:
return any(isinstance(t, list) and len(t) >= 2 and t[0] == "e"
and (len(t) < 4 or t[3] in ("reply", "root"))
for t in event.get("tags") or [])
An e tag without a marker, or with the marker reply or root, makes the event a reply. A mention does not.
When a task ends, the fleet answers in the thread of the request and, when the work has landed, adds a check mark reaction to the request. Both go through the buzz CLI and are signed with the fleet’s key.
Decentralized Git: NIP-34 and NIP-98
In addition to chat channels, sovereign-fleet 0.12.0 implements native support for NIP-34 (git collaboration on Nostr). NIP-34 defines event kinds for git repositories:
- Kind 30617: Repository Announcement
- Kind 30618: Repository State
- Kind 1621: Issue
- Kind 1618: Pull Request
- Kind 1619: Pull Request Update
- Kind 1631: Status (applied, merged or resolved)
When a project has landing = "pull_request" and its remote is a nostr:// URL, the fleet pushes its work to the branch pr/<task-branch> on the repository’s git server and announces it on Nostr as a kind 1618 pull request. A second landing of the same branch sends a kind 1619 update instead of opening a second pull request.
The NIP-98 Authentication Challenge
Buzz embeds a git HTTP server that protects repository push and fetch operations with NIP-98 (HTTP authentication over Nostr). A client performing a git push must send an Authorization: Nostr <base64-event> header containing a signed Kind 27235 event:
{
"kind": 27235,
"tags": [
["u", "https://relay.example/git/<owner>/<repo>.git"],
["method", "GET"]
],
"content": ""
}
Git 2.43, the version Ubuntu ships, knows nothing about Nostr. The credential helpers written for this need newer Git features (2.46 and later).
The fleet does not need them. Before each git call it asks the server whether it wants Nostr auth, signs a token with nak, and hands it to git as an extra HTTP header through git’s own environment variables:
async def _git_env(self, clone: str) -> Dict[str, str]:
"""GIT_CONFIG_* with a fresh NIP-98 header when the server asks for one, else {}."""
if not await self.challenge(clone):
return {}
code, out, err = await self.run([self.nak, "event", "-k", "27235", "-t", f"u={clone}",
"-t", "method=GET"], None, self._secret_env())
if code != 0 or not out.strip().startswith("{"):
raise NostrPrError(f"cannot sign the git server's NIP-98 token: {err.strip()[-200:]}")
token = base64.b64encode(out.strip().splitlines()[-1].encode()).decode()
return {"GIT_CONFIG_COUNT": "1", "GIT_CONFIG_KEY_0": "http.extraHeader",
"GIT_CONFIG_VALUE_0": f"Authorization: Nostr {token}"}
In our tests Buzz bound the token to the repository URL and to a window of about sixty seconds, not to the HTTP method, so one token covers every request of a single git call. The key reaches nak through its environment and never appears in a command line; the token lives in the environment of one git process and is not written to disk.
Fresh Helper Repositories for ngit
For NIP-34 issue tracking, the fleet uses ngit (version 3.0.5). During testing, we encountered an upstream caching bug: when ngit reused a local helper cache repository across multiple calls, its incremental sync frequently missed events posted by other clients.
To guarantee that incoming issues and comments are never dropped due to stale local state, NgitTracker instantiates a clean, ephemeral helper repository for each query operation. That costs a full sync on every poll instead of an incremental one, and in exchange the fleet sees every issue, whoever published it.
Engineering Lessons and Protocol Realities
Building against emerging protocols always reveals differences between specification and implementation. Three findings from our deployment stand out:
1. Kind 1111 Comment Rejections
The NIP-34 specification references NIP-22 (Kind 1111) for threaded issue comments. However, Buzz 1.0 currently rejects Kind 1111 events with restricted: unknown event kind.
When the fleet completes a task originated from an ngit issue, posting a Kind 1111 comment fails. Rather than aborting the landing, sovereign-fleet catches this rejection and proceeds to publish the Kind 1631 status event (marking the issue resolved). The work lands, and the issue state updates, even while comment threading awaits upstream relay updates.
2. The Illusion of Synthetic Unit Tests
Early autonomous coding attempts to build the ngit intake created full test suites with mocked CLI outputs. All unit tests passed cleanly.
When executed against the live relay, the code failed immediately: command-line argument flags were invented, repository identifiers were incorrectly lowercased (corrupting case-sensitive Nostr addresses), and relay authentication parameters were omitted.
This was a stark reminder of our core architectural premise: unit test gates prove that code satisfies the developer’s assumptions, not that it works against the real world. Live integration probes on private relays are essential before deploying autonomous pipelines.
3. Path Expansion in Sandboxed Processes
In diverse server environments, operators configure CLI binaries using tilde paths (~/bin/nak) or environment variables ($HOME/.local/bin/ngit). When passing command paths to subprocess.run or asyncio.create_subprocess_exec with a list of arguments, the shell does not expand these paths automatically.
In 0.12.0, all external CLI invocations pass through an explicit _expand normalizer, ensuring that configuration paths resolve reliably regardless of host environment conventions.
Current Limitations
Several areas remain open for subsequent releases:
- Signature Verification (closed in 0.12.1): 0.12.0 took the author of a Buzz message from the relay’s answer and relied on the closed relay to reject forged events. Since 0.12.1 the fleet checks the id and the Schnorr signature of every channel message itself (
nak verify) before it reads the author, and a poll fails when that check cannot run. - Desktop Agent Lifecycle: Agents embedded in the Buzz desktop app operate only while the user’s desktop application is running. The sovereign-fleet daemon operates as an always-on system service, ensuring tasks posted from mobile are processed even when no desktop workstation is powered on.
- One Relay, One Run: The timings above come from a single run against one self-hosted, closed relay on a private network. Several public relays add propagation delays that this setup does not show, and the fleet has not been tested against them.
Conclusion
Decentralized protocols like Nostr provide the ideal communication fabric for sovereign AI agents: open standards, cryptographic identity, and verifiable audit trails without platform lock-in.
By pairing Nostr messaging with Linux kernel sandboxing and deterministic testing gates, sovereign-fleet 0.12.0 demonstrates that autonomous coding agents can operate safely, quickly, and unattended in a shared human-agent workspace.
Links and Resources
- Sovereign Fleet: https://github.com/Sovgrid/sovereign-fleet
- Fleet Project Page: https://sovgrid.org/fleet/
- Self-Hosting Buzz on DGX Spark: https://sovgrid.org/blog/buzz-self-hosted-relay-dgx-spark-arm64/
- Block Buzz Relay: https://github.com/block/buzz
- Buzz Desktop App: https://github.com/block/buzz-app
- NIP-34 Git Collaboration: https://github.com/nostr-protocol/nips/blob/master/34.md
- NIP-98 HTTP Auth: https://github.com/nostr-protocol/nips/blob/master/98.md