Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
s-hiraoku avatar

Synapse A2a

  • 372 installs
  • 10 repo stars
  • Updated July 21, 2026
  • s-hiraoku/synapse-a2a

synapse-a2a is a Claude Code skill that teaches Google A2A Protocol workflows for synapse CLI so developers who run multiple coding agents can send messages, spawn workers, and lock files safely.

About

synapse-a2a is the companion skill for Synapse A2A, a framework that connects CLI coding agents through Google's A2A Protocol without modifying Claude Code, Codex, Gemini, OpenCode, or GitHub Copilot CLIs. The skill catalogs commands such as synapse send, synapse spawn with --task-file, synapse team start, synapse memory, synapse wiki, and synapse file-safety for coordinating multi-agent work on one repository. It explains spawn flags per runtime, prefers JSON outputs like synapse list --json for automation, and covers worktree discipline when subagents inherit shell state. Developers reach for synapse-a2a when delegating fixes to Codex from Claude Code, broadcasting status across agents, or orchestrating three-plus phase tasks that need specialists, file locks, and regression-tested handoffs instead of a single monolithic agent session. Install via gh skill install s-hiraoku/synapse-a2a synapse-a2a --agent claude-code or npx skills add when you need agents to understand delegation, interrupts, and broadcast messaging primitives.

  • synapse-a2a
  • Claude Code
  • Enhanced workflow

Synapse A2a by the numbers

  • 372 all-time installs (skills.sh)
  • +2 installs in the week ending Jul 27, 2026 (Skillselion tracking)
  • Ranked #1,118 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Jul 30, 2026 (Skillselion catalog sync)
npx skills add https://github.com/s-hiraoku/synapse-a2a --skill synapse-a2a

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs372
repo stars10
Last updatedJuly 21, 2026
Repositorys-hiraoku/synapse-a2a

How do CLI coding agents coordinate safely?

Support build phase development with Claude Code

Who is it for?

Developers running Claude Code alongside Codex, Copilot, or Gemini CLIs who need structured multi-agent messaging, spawning, and file-lock coordination on one repo.

Skip if: Developers completing a small single-file edit in one agent session who do not need cross-agent orchestration overhead or A2A messaging infrastructure.

When should I use this skill?

The user runs or asks about synapse send, synapse spawn, synapse file-safety, multi-agent delegation, or Google A2A Protocol coordination between CLI agents.

What you get

Spawned agent processes, A2A message threads, file-safety locks, shared memory entries, and JSON status from synapse list or synapse status.

  • agent spawn commands
  • A2A message workflows
  • file lock policies

By the numbers

  • Built on Google A2A Protocol for inter-agent messaging and task delegation
  • Documents synapse spawn, send, file-safety, memory, and wiki CLI commands
  • Supports Claude Code, Codex, Copilot, Gemini, and OpenCode agent runtimes

Files

SKILL.mdMarkdownGitHub ↗

Synapse A2A Communication

Inter-agent communication framework via Google A2A Protocol.

Worktree Discipline (subagents, read this first)

NEVER `cd` into `.synapse/worktrees/<name>/` directories.

>

Subagents (Claude Code Agent tool, Codex subprocess, and any other
sub-process driven by the parent session) inherit a persistent shell
from the parent. A stray cd into a worktree leaks out of the subagent
turn and silently corrupts the parent's working directory — git status,
git diff, and even git commit then land on the wrong worktree, which
wastes debugging time and can put commits on the wrong branch.

>

Rules for working with .synapse/worktrees/:

>

- Do not cd into a worktree, ever. Stay in the original working
directory for the entire session.
- Read and write files inside a worktree using absolute paths only
(for example Read /Volumes/.../.synapse/worktrees/foo/src/bar.py,
not cd .synapse/worktrees/foo && cat src/bar.py).
- Run git against a worktree with git -C /abs/path/to/worktree ...
instead of changing directory.
- Worktrees are managed by Synapse (synapse spawn --worktree,
synapse team start --worktree). Treat them as read/write data
surfaces, not as places to live.

>

If you need to operate from inside a worktree (e.g. running pytest
there), spawn a dedicated agent for it with synapse spawn --worktree
rather than changing the parent shell's directory.

Quick Reference

TaskCommand
List agentssynapse list for humans (auto-refresh, interactive: arrows/1-9 select, Enter jump, k kill, / filter). For AI/scripts use synapse list --json, synapse list --plain, or MCP list_agents
Agent detailsynapse status <target> [--json]
Stuck-agent watchdog (Stage 1)synapse watchdog check [--alarm-only] [--json] (one-shot heuristic scan; #646)
Send messagesynapse send <target> "<msg>" (default: --notify; --from auto-detected)
Broadcastsynapse broadcast "<msg>"
Wait for replysynapse send <target> "<msg>" --wait
Fire-and-forgetsynapse send <target> "<msg>" --silent
Replysynapse reply "<response>"
Reply to specificsynapse reply "<response>" --to <sender_id>
Reply with failuresynapse reply --fail "<reason>"
Interrupt (priority 4)synapse interrupt <target> "<msg>"
Send keys to PTY (escape hatch for TUI dialogs; #695)synapse send-keys <target> <keys> (e.g. a for codex "don't ask again", \r for Enter; bypasses A2A — use when an agent is stuck on an interactive dialog without synapse jump)
Spawn agentsynapse spawn <type> --name <n> --role "<r>" -- <tool-specific-automation-args>
Spawn + send first task (preferred for delegation)synapse spawn <type> --name <n> --role "<r>" --task-file <path> --task-timeout 600 --notify
Spawn with worktreesynapse spawn <type> --worktree --name <n> --role "<r>" -- <tool-specific-automation-args>
Team startsynapse team start <homogeneous-profiles...> [--worktree] -- <tool-specific-automation-args>
Approve plansynapse approve <id>
Reject plansynapse reject <id> --reason "<feedback>"
Save knowledgesynapse memory save <key> "<content>" --tags <t> --notify
Search knowledgesynapse memory search "<query>"
Lock filesynapse file-safety lock <file> <agent_id> --intent "..."
Check lockssynapse file-safety locks
Task historysynapse history list --agent <name>
Kill agentsynapse kill <name> -f
Cleanup orphanssynapse cleanup --dry-run (list); synapse cleanup -f (kill all orphans whose parent crashed/cleared)
Attach filessynapse send <target> "<msg>" --attach <file> --wait
Saved agentssynapse agents list / synapse agents set <profile> / synapse agents unset <profile> / synapse agents roles / synapse spawn <agent_id>; live agents expose agent_definition_id as a stable target alias
Shared session handoffsynapse session publish <name> / synapse session import <name> using SYNAPSE_SHARED_SESSION_DIR
Post to Canvassynapse canvas post <format> "<body>" --title "<title>"
Link previewsynapse canvas link "<url>" --title "<title>"
Post templatesynapse canvas briefing '<json>' --title "<title>"
Post plan cardsynapse canvas plan '<json>' --title "<title>" (Mermaid DAG + step list with status tracking)
Open Canvassynapse canvas open (auto-starts server, opens browser)
Restart Canvassynapse canvas restart (stop + start; use when canvas status reports ⚠ STALE after upgrade)
Sync workflow skillssynapse workflow sync (regenerate skills from workflow YAMLs, remove orphans)
Run workflow (auto-spawn)synapse workflow run <name> --auto-spawn (supports DAG steps with depends_on and condition)
Multi-agent patternssynapse map init/list/show/run/status/stop (built-in: generator-verifier, orchestrator-subagent, agent-teams, message-bus, shared-state)
Wiki ingest`synapse wiki ingest <source> [--scope project\
Wiki query`synapse wiki query "<question>" [--scope project\
Wiki lint`synapse wiki lint [--scope project\
Wiki status`synapse wiki status [--scope project\

Collaboration Decision Framework

Evaluate collaboration opportunities before starting work:

SituationAction
Small task within your roleDo it yourself
Task outside your role, READY agent existsDelegate: synapse send --notify or --silent
No suitable agent exists, need to delegate a taskSpawn + task in one command: synapse spawn <type> --name <n> --role "<r>" --task-file <spec.md> --task-timeout 600 --notify. This spawns, waits for READY, and sends the first task — no manual readiness polling needed.
Need a bare agent (no initial task)synapse spawn <type> --name <n> --role "<r>" (send tasks later via synapse send)
Stuck or need expertiseAsk: synapse send <target> "<question>" --wait
Completed a milestoneReport: synapse send <manager> "<summary>" --silent
Discovered a patternShare: synapse memory save <key> "<pattern>" --tags ... --notify

Recommended Collaboration Gate (3+ phases OR 10+ file changes): Consider these steps before diving into large work: 1. synapse list --json or MCP list_agents — check available agents 2. synapse memory search "<topic>" — check if someone already solved this 3. Build Agent Assignment Plan (Phase / Agent / Rationale) when delegation is beneficial 4. Spawn specialists if needed (prefer different model types for diversity)

Skip this gate for small/medium tasks where the overhead exceeds the benefit.

Use Synapse Features Actively

FeatureWhy It MattersCommands
Shared MemoryCollective knowledge survives agent restartssynapse memory save/search/list
File SafetyLocking prevents data loss when two agents edit the same file -- skip inside worktrees (SYNAPSE_WORKTREE_PATH)synapse file-safety lock/unlock/locks
WorktreeFile isolation eliminates merge conflicts in parallel editingsynapse spawn --worktree
BroadcastTeam-wide announcements reach all agents instantlysynapse broadcast "<msg>"
HistoryAudit trail tracks what happened and whensynapse history list/show/stats
Probabilistic RecallRecall relevant past task observations by recency, importance, and keyword overlap without dumping all historyHistoryManager.recall_observations
Plan ApprovalGated execution ensures quality before actionsynapse approve/reject
CanvasVisual dashboard for sharing rich cards and templates (briefing, comparison, dashboard, steps, slides, plan); cards downloadable as Markdown, JSON, CSV, or native format via browser button or GET /api/cards/{card_id}/downloadsynapse canvas post/link/briefing/plan/open/list/restart
Agent ControlBrowser-based agent management via Canvas #/admin view (select agents, send messages, view responses, double-click agent row to jump to terminal)synapse canvas open → navigate to #/admin
Workflow ViewBrowser-based workflow management via Canvas #/workflow view (list workflows, inspect steps, create/edit/delete/import/export workflow YAML, trigger runs, monitor progress with live SSE updates; run history persisted to SQLite across restarts)synapse canvas open → navigate to #/workflow
Harnesses ViewBrowser-based browser for agent harness resources at Canvas #/harnesses — sub-views #/harnesses/skills (SKILL.md inventory across user/project/synapse/plugin scopes, scanned per active project root) and #/harnesses/mcp (MCP server configs from project .mcp.json per active root, plus user-scope: Claude Code ~/.claude.json, Codex ~/.codex/config.toml, Gemini ~/.gemini/settings.json, OpenCode ~/.config/opencode/opencode.json, and Claude Desktop config)synapse canvas open → navigate to #/harnesses
Plan CardsMermaid DAG + step list with dependency visualizationsynapse canvas plan
LLM WikiStructured knowledge base for ingesting, querying, and validating project/global docssynapse wiki ingest/query/lint/status
Smart SuggestMCP tool that analyzes prompts and suggests team/task splits for large workMCP tool: analyze_task
Project LearningsSaved definitions can load project-adaptive learnings from .synapse/learnings/<agent_definition_id>.md on startupsynapse agents set + Markdown learnings
Proactive ModeTask-size-based feature usage guide (SYNAPSE_PROACTIVE_MODE_ENABLED=true)See references/features.md
MCP BootstrapDistribute instructions via MCP resources for compatible clients (opt-in, including Copilot via tools-only). MCP tools: bootstrap_agent, list_agents, analyze_task, canvas_postsynapse mcp serve / python -m synapse.mcp

When to Use Canvas

Use Canvas when the output benefits from visual structure or will be referenced later:

  • Use Canvas for: diagrams, comparison tables, multi-step plans, design docs, results with rich formatting
  • Skip Canvas for: simple completion reports, single-file changes, quick status updates (use broadcast or reply instead)

Template selection guide:

  • briefing — structured reports, status updates, release summaries
  • comparison — before/after, option trade-offs, review diffs
  • steps — plans, migration sequences, execution checklists
  • slides — walkthroughs, demos, page-by-page narratives
  • dashboard — multi-widget operational snapshots, compact status boards
  • plan — task DAGs with Mermaid visualization and step tracking

Use raw synapse canvas post <format> for single blocks; templates for multi-section content.

Spawning Decision Table

⚠️ Same-model rule — try subagents first. When a Claude Code agent needs
another claude (or a codex agent needs another codex), use the in-process
subagent (Agent / Task tool for Claude, subprocess for Codex) before
reaching for synapse spawn. Spawning the same model on the same account
shares the rate-limit window — it doubles consumption against the same quota
instead of distributing it. Reserve same-model synapse spawn for cases
where the helper must outlive the parent session, needs file isolation that
subagents can't provide, or holds a distinct long-running role.

>

synapse spawn is the right tool for cross-model delegation
(Claude → codex / gemini), agents that lack subagent support
(Gemini / OpenCode / Copilot), or persistent multi-task helpers.

Default spawn policy: When using synapse spawn, pass the underlying CLI's tool-specific automation args after -- so spawned agents can run unattended. For most CLIs this is an approval-skip / auto-approve flag; for OpenCode use --agent build to select the build agent profile and rely on OpenCode's permission config for approval behavior.

Apply the same rule to synapse team start: include the appropriate forwarded CLI args by default, and keep teams homogeneous when those args are CLI-specific.

Common defaults (Synapse already injects these automatically — pass --no-auto-approve to opt out):

  • Claude Code: synapse spawn claude --name <n> --role "<r>" -- --permission-mode=auto
  • Gemini CLI: synapse spawn gemini --name <n> --role "<r>" -- --approval-mode=yolo
  • Codex CLI: synapse spawn codex --name <n> --role "<r>" (synapse injects -cdefault_permissions=":workspace"; Codex 0.128+ removed --full-auto)
  • OpenCode: synapse spawn opencode --name <n> --role "<r>" -- --agent build (selects the build agent profile; not a skip-approval flag)
  • Copilot CLI: synapse spawn copilot --name <n> --role "<r>" -- --allow-all
  • Claude team: synapse team start claude claude -- --permission-mode=auto
  • Gemini team: synapse team start gemini gemini -- --approval-mode=yolo
  • Codex team: synapse team start codex codex (synapse injects -cdefault_permissions=":workspace")
  • OpenCode team: synapse team start opencode opencode -- --agent build (selects the build agent profile; permission prompts still depend on OpenCode config)
  • Copilot team: synapse team start copilot copilot -- --allow-all
2026-04 migration: Anthropic deprecated --dangerously-skip-permissions
in favor of --permission-mode=auto (safety classifier instead of disabling
all checks). Gemini similarly recommends --approval-mode=yolo over the
legacy --yolo / -y short forms. Synapse now injects the new flags by
default; the legacy forms still work and remain in each profile's
alternative_flags.
ConditionAction
Existing READY agent can handle itsynapse send — reuse is faster (avoids startup overhead)
Same-model helper needed (Claude → claude, Codex → codex)Use the in-process subagent first (Agent/Task tool for Claude, subprocess for Codex). synapse spawn same-model shares the rate-limit window.
Need parallel executionsynapse spawn with --worktree -- <tool-specific-automation-args> for file isolation (cross-model preferred)
Task needs a different model's strengthssynapse spawn a different type (Claude spawns Gemini / Codex, etc.)
User specified agent countFollow exactly
Single focused subtaskSubagent (same model) or synapse spawn (cross model)
N independent subtasksSubagents for same-model fan-out, synapse spawn for cross-model

Spawn lifecycle (preferred, one-command): synapse spawn --task-file ... --task-timeout 600 --notify → wait for A2A completion notification → evaluate result → synapse kill <name> -f → confirm in synapse list --json

Legacy lifecycle (only when you need control between spawn and first task): spawn → poll synapse list --json or synapse status <target> --json for READY (allow several minutes; default 30s timeout is too short for most profiles) → synapse send --notify → evaluate → synapse kill -f → confirm cleanup.

⚠️ Common pitfall: sending to an agent that is not yet READY either hangs at the HTTP layer or blocks on the internal readiness wait. Either use synapse spawn --task-file (preferred — it handles readiness for you), or explicitly confirm "status": "READY" before calling synapse send. Do not assume 30 seconds is enough — most profiles take 1-5 minutes.

Agent status set (synapse list --json .status):

StatusMeaningAction
READYIdle, can accept new worksynapse send
SENDING_REPLYTemporarily sending an outbound A2A send/reply POSTWait; previous status is restored after the POST finishes
PROCESSINGActively working a taskWait, or synapse interrupt if stuck
WAITINGAwaiting a permission/approval promptsynapse approve / synapse reject
WAITING_FOR_INPUTTask is paused asking for non-permission input (#538)synapse reply <task_id> with the answer
RATE_LIMITEDLast task failed due to LLM provider rate limit (#561)Wait for the provider window to reset, then re-send
DONETask complete; demotes to READY after ~10sRead result, then proceed
SHUTTING_DOWNAgent is exitingDo not send
Stuck on a CLI dialog (not A2A `WAITING`)? When an agent looks idle but is
blocked on its own TUI prompt (codex edit-confirmation, model picker,
rate-limit dialog), use synapse send-keys <target> <keys> to write directly
to the PTY without synapse jump. Example: synapse send-keys Impl a sends
the codex "don't ask again" shortcut. (#695)

Killing spawned agents after completion frees ports, memory, and PTY sessions, and prevents orphaned agents from accidentally accepting future tasks.

# Preferred: one-command spawn + delegate (handles readiness wait internally)
synapse spawn gemini \
    --name Tester \
    --role "test writer" \
    --task-file /tmp/test-spec.md \
    --task-timeout 600 \
    --notify
# (do other work; receive async A2A notification when Tester finishes)
# Evaluate result, then cleanup
synapse kill Tester -f
synapse list --json                       # Verify cleanup (AI-safe)

If synapse kill fails or the agent still appears in synapse list --json, retry with -f, check the agent status/logs, and report the cleanup failure instead of leaving an orphaned agent behind.

Response Mode Guide

Choose based on whether you need the result:

ModeFlagUse When
Wait--waitYou need the answer before continuing (questions, reviews)
Notify--notify (default)Async — you'll be notified on completion
Silent--silentFire-and-forget delegation (no response needed; sender history still updates best-effort on completion)

Worker Agent Guide

When you receive a task from a manager:

On Task Receipt

1. Start work immediately (synapse reply is valid for Synapse-tracked messages with a registered reply target, including [REPLY EXPECTED] and --response; otherwise user-pasted A2A: text has no reply target, so respond with synapse send instead) 2. Check shared knowledge: synapse memory search "<task topic>" 3. Lock files before editing (skip if SYNAPSE_WORKTREE_PATH is set): synapse file-safety lock <file> $SYNAPSE_AGENT_ID

During Work

  • Report progress if task takes >5 minutes: synapse send <manager> "Progress: <update>" --silent
  • Report blockers immediately: synapse send <manager> "<question>" --wait
  • Save findings: synapse memory save <key> "<finding>" --tags <topic>
  • You can delegate subtasks too — spawn helpers (prefer different model types)
  • Always clean up agents you spawn: synapse kill <name> -f

On Completion

1. Report to manager: synapse send <manager> "Done: <summary>" --silent

On Failure

1. Report details: synapse send <manager> "Failed: <error details>" --silent

Related Skills

SkillPurpose
synapse-managerMulti-agent orchestration workflow (delegation, monitoring, verification)
synapse-reinstRe-inject instructions after /clear or context reset

References

For detailed information, consult these reference files:

ReferenceContents
references/commands.mdFull CLI command documentation with all options
references/api.mdA2A endpoints, readiness gate, error handling
references/examples.mdMulti-agent workflow examples and patterns
references/file-safety.mdFile locking workflow and commands
references/messaging.mdSending, replying, priorities, status states, interactive controls
references/spawning.mdSpawn lifecycle, patterns, worktree, permissions, API
references/collaboration.mdAgent naming, external agents, auth, resume, path overrides
references/features.mdSessions, workflows, saved agents, tokens, skills, settings, Canvas

Related skills

How it compares

Pick synapse-a2a when multiple CLI agents must collaborate on one codebase with locks and messaging; use single-agent skills for solo edits.

FAQ

What is synapse-a2a used for?

synapse-a2a teaches Synapse A2A inter-agent communication: synapse send and reply, spawning workers with synapse spawn, shared synapse memory, wiki pages, and synapse file-safety locks during multi-agent development.

Which agents does synapse-a2a support?

synapse-a2a documents spawn and team commands for Claude Code, Codex CLI, Gemini CLI, OpenCode, and GitHub Copilot CLI, each with runtime-specific automation flags like --dangerously-skip-permissions or --full-auto.

How should agents read synapse-a2a status programmatically?

synapse-a2a recommends synapse list --json, synapse status <target> --json, or the MCP list_agents tool instead of interactive synapse list when coding agents automate orchestration workflows.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.