Clawmail

From joelhooks/joelclaw · View interactive version

Clawmail is an AI agent skill from the GitHub repository joelhooks/joelclaw. Canonical joelclaw mail coordination protocol for all agents. Use when announcing work, checking inboxes, reserving files, releasing locks, handling task handoffs, triaging stale reservations, or auditing coordination quality. Triggers on: 'clawmail', 'agent mail', 'joelclaw mail', 'reserve files',

How to use this skill

Skill file

Clawmail

For private addresses, accounts, ports, and host roles, see .brain/resources/operator-network-context.svx in the private dark-wizard repo and the tailnet-topology skill. Replace angle-bracket placeholders with the configured values before running commands.

Canonical agent coordination contract for joelclaw.

joelclaw mail is the only supported mail access surface for pi agents.

Do not call mcp_agent_mail HTTP endpoints directly from agent prompts or role instructions.

Topology

Agent-mail is a Central service, not a mailbox per machine:

Tracked connector assets:

Interfaces

Canonical interface

Pi wrapper tools (allowed, but still CLI-backed)

These wrappers shell to joelclaw mail under the hood:

| Tool | CLI equivalent |

|------|----------------|

| mail_send | joelclaw mail send |

| mail_inbox | joelclaw mail inbox |

| mail_read | joelclaw mail read |

| mail_reserve | joelclaw mail reserve |

| mail_release | joelclaw mail release |

| mail_status | joelclaw mail status |

Required Protocol (default for shared work)

  1. Check inbox before touching files
  1. Announce active scope
  1. Reserve file paths before edits
  1. If work runs long, renew reservation lease
  1. Send status/handoff updates during work
  1. Release reservations after commit/handoff

Subject Taxonomy (for searchability + steering)

Use these prefixes consistently:

Daily steering uses these signals to detect protocol drift.

Command Quick Reference

# server + inbox health
joelclaw mail status

# register / refresh identity metadata
joelclaw mail register --agent MaroonReef --program pi --model gpt-5.4 --task "interactive"

# send a coordination message
joelclaw mail send --from MaroonReef --to BlueFox --subject "Task: update prompt docs" "Please edit SYSTEM.md and roles/*.md"

# inbox / read
joelclaw mail inbox --agent MaroonReef --unread
joelclaw mail read --agent MaroonReef --id 12

# reservations
joelclaw mail reserve --agent MaroonReef --paths "SYSTEM.md,roles/interactive.md" --ttl-seconds 900
joelclaw mail renew --agent MaroonReef --paths "SYSTEM.md" --extend-seconds 900
joelclaw mail release --agent MaroonReef --paths "SYSTEM.md,roles/interactive.md"
joelclaw mail release --agent MaroonReef --all

# audit/search
joelclaw mail locks
joelclaw mail search --query "Starting:"

Reliability Checks

Verify protocol health quickly

joelclaw mail status
joelclaw mail locks
joelclaw mail search --query "Starting:"
joelclaw mail search --query "Status:"

joelclaw mail locks should reflect active advisory file reservations from the local git-mailbox file_reservations/ artifacts when that repo is available. This matters because the raw /mail/api/locks endpoint can under-report file reservations while still showing mailbox-internal archive/commit locks.

If search is degraded (DB/tool errors)

If CLI flags are rejected unexpectedly

If wrapper output says `ok: true` but the nested result contains an error

Prompt Authoring Checklist (shore up prompts)

Any prompt/role/system contract that mentions coordination should:

  1. Reference clawmail as canonical protocol skill.
  2. State that mail access is via joelclaw mail (wrappers allowed, direct MCP not allowed).
  3. Include at minimum: inbox check, announce, reserve, release.
  4. Require path context in coordination messages.
  5. Encourage subject prefixes (Starting:, Task:, Status:, Blocked:, Done:).
  6. Avoid filler about mail when no shared edits/coordination are involved.

Steering Loop Integration

pi/extensions/session-lifecycle runs a daily monitor+steer review and emits:

Snapshot path:

Use steering hints to tighten protocol compliance when drift is detected.

Related

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.