Version 0.2: one Rust binary, no Node

Human
Coordination Plane

Your AI agents ask before they act. You answer in Slack. Every step is written to your Obsidian vault. One small binary, running in the background on your Mac.

⬡ View on GitHub Install on a Mac

One request, start to finish

An agent is about to do something it should not decide alone. Here is that one request in the three places it shows up.

1

The agent asks

Claude Code is about to force-push. The hook holds the command and asks you.

  hcp hook
# Claude Code is about to run
git push --force origin main

# the hook holds it and asks you
[hcp-hook] waiting for approval in Slack (request 01M7ADF3…)

# you tap Approve
[hcp-hook] approved by slack:isaac

# the command runs. A rejection, or no
# answer in five minutes, would block it
2

You answer in Slack

The request arrives in your channel and says what happens if nobody answers.

3

The vault keeps the record

A note for the request, rewritten at every step, in the vault you already use.

No answer by the deadline? The request's own timeout policy applies: reject it, approve it, escalate it once to someone else, or let it time out.

One binary in the middle

hcp is a single executable. It is the API your agents call, the thing that talks to Slack, the scheduler that enforces deadlines, and the writer of your vault. The MCP server and the Claude Code hook are the same file, run with a different word after it.

HCP architecture Agents send requests to the hcp binary over the REST API, the MCP server or the Claude Code hook, and receive answers. hcp posts requests to Slack over an outbound WebSocket and receives button clicks back. It stores requests, keys and audit events in Postgres, and writes notes and the audit log to an Obsidian vault. Your agents REST API hcp mcp hcp hook Claude Code, any MCP harness hcp one Rust binary, on your Mac API and state machine deadlines and escalation Slack and vault writers Slack where you answer Approve, Reject, Respond no public URL needed Postgres requests, keys, audit events Obsidian vault request notes, audit log requests answers messages clicks outbound WebSocket one transaction queued, then written

Runs on your Mac

Installs as a launchd service. It starts at login, is restarted if it stops, and listens on localhost only unless you say otherwise.

Postgres holds the state

Requests, API keys and audit events live in Postgres. A state change and its audit record are written in one transaction, so neither exists without the other.

Obsidian holds the record

Each audit event is queued in that same transaction and then written to your vault. If the vault is unavailable the log falls behind and catches up. Entries are not lost.

Answered where you already are

There is no portal to keep open. Requests arrive in a Slack channel and you answer from your phone or your desk.

  • No public URL. hcp opens an outbound connection to Slack (Socket Mode), so a Mac behind a home router works as it is.
  • The message says what silence means. Every request shows its deadline and what happens then. If no answer means yes, that part is in bold.
  • Name a responder and only their click counts. Anyone else who presses a button is told, privately, why nothing happened.
  • Messages retire themselves. Once a request is answered, cancelled, escalated or timed out, its message is rewritten to say so and the buttons are removed.
What you get for each kind of request
The agent asks for In Slack
An approval Approve and Reject buttons
A clarification, decision, review, input or escalation A Respond button that opens a text box. Your words go back to the agent
Nothing; it is a notification Logged to the vault. Posted only if you name a channel for notifications

The audit trail is a folder of Markdown

The log lives in your Obsidian vault as plain notes you can search, link and query, next to everything else you keep there.

  • One note per request, with properties you can filter on: state, intent, urgency, agent, responder, decision, deadline.
  • An append-only daily log. Each line links to its request and ends in a block ID, so another note can point at one specific event.
  • Agent text stays inert. Whatever an agent puts in a request is written as plain text. It cannot plant links, tags, properties or plugin code in your vault.
  • Postgres is still the system of record. The vault is the copy you read.
  your vault
HCP/
  Requests/2026-11/
    01M7ADF336CWQ1VMM5SQMFZJ3Y.md   one note per request
  Log/
    HCP Log 2026-11-13.md           every event, one line each
  Service/
    HCP Service 2026-11-13.md       the server's own log
  HCP Log 2026-11-13.md
- `12:17:38.406` `CR_SUBMITTED` · [[01M7ADF3…|APPROVAL: Claude Code wants to run…]] · `claude-code` (AGENT) ^01M7ADF3394J
- `12:18:52.117` `CR_RESPONDED` · [[01M7ADF3…|APPROVAL: Claude Code wants to run…]] · `slack:U07ISAAC` (HUMAN) ^01M7ADF341Q7

See what is waiting, at a glance

HCP.app is a Mac app that shows what the server is doing. It watches; it does not answer. Answers stay in Slack, where HCP checks who clicked.

  • What is waiting on you, with live countdowns to each deadline, and a menu-bar icon with the count.
  • How it is going: approval rate, median and p90 time to answer, and what went unanswered, for today or up to 90 days.
  • Connector health for Slack, the Obsidian vault and Postgres, each with a test button.
  • Its key stays in your Keychain. The app creates its own key on first launch, and the web view inside it never sees it.
What the dashboard shows
View What is in it
Headline figures Waiting now, next deadline, requests, approval rate, response times
Charts Requests per day by outcome, and by agent, each with a table view
Lists Waiting now, recent activity, responders, intents. Click a request for its context and audit trail
Connectors Server and launchd service, Slack, the vault and the database

Three ways for an agent to ask

All three end in the same place: a request in Slack and a record in the vault.

REST API

Post a request, poll for the answer. Anything that can make an HTTP call can use it, with an API key per agent.

MCP server

hcp mcp gives any MCP harness five tools. hcp_coordinate asks and waits for your answer; hcp_notify tells you something and moves on. It speaks every MCP revision from 2024-11-05 to 2026-07-28.

Claude Code hook

hcp hook sees every command before it runs, whether the agent wants it to or not. Nothing in the agent's prompt has to change.

How the hook sorts Bash commands
Tier For example What happens
Safe ls, git status, cat x | grep y Passes silently, without contacting the server
Notify cargo build, npm install, file edits Logged. Nothing waits
Gate rm -rf, git push, terraform apply, DROP TABLE Held until you approve it in Slack

Working at the Mac that runs HCP? With HCP_HOOK_WHEN_PRESENT=terminal, a held command is asked in Claude Code's own prompt while a display is on and the screen is unlocked, and goes to Slack when you are away.

The gate is a list of patterns for common destructive commands. It is a tripwire, not a sandbox: a determined agent can find a command it does not match.

When it is unsure, it says no

An approval step that waves things through when something breaks is not an approval step. These are the cases hcp is built around.

An agent cannot approve itself

Answering through the API takes a key with a separate permission, one that agent keys are not given.

Nothing is approved unseen

If Slack could not deliver a request, it never counts as waiting on you, so an approve-on-timeout policy cannot fire on something nobody was shown.

A held command needs a person

A rejection, a timeout, a lost connection and an unreachable server all block it. Letting commands through when the server is down is a setting you have to turn on.

Clicks are authenticated

Button presses arrive over the connection hcp opened to Slack, or over HTTP with Slack's signature checked. Nobody can approve by guessing a URL.

Escalation ends

An unanswered request escalates once, to the person you named, with a fresh deadline. If they do not answer either, it times out.

Agents see only their own

An agent's key reads, cancels and collects answers for that agent's requests and nobody else's.

Install on a Mac

You need a Rust toolchain, a Postgres database, an Obsidian vault and a Slack app. The installer builds the binary and sets it up as a background service.

  terminal
git clone https://github.com/Qanata/HCP && cd HCP

# Build and install. The first run creates ~/.config/hcp/hcp.env and stops there
deploy/macos/install.sh

# Fill in that file, then create a key for each agent
~/.local/bin/hcp --env-file ~/.config/hcp/hcp.env keys create claude-code

# Run the installer again to start the service
deploy/macos/install.sh

curl http://127.0.0.1:3100/health

# Optional: the dashboard app, installed as ~/Applications/HCP.app
deploy/macos/install-desktop.sh

# Give Claude Code the MCP tools, in every project
claude mcp add --scope user hcp -- ~/.local/bin/hcp --env-file ~/.config/hcp/claude-code.env mcp
# then add the hook to ~/.claude/settings.json (see the README) and restart Claude Code
  ~/.config/hcp/hcp.env
DATABASE_URL="postgresql://…"
HCP_OBSIDIAN_VAULT="~/Obsidian/Main"   # the vault folder; logs go under HCP/ inside it
SLACK_BOT_TOKEN=xoxb-…
SLACK_APP_TOKEN=xapp-…               # enables Socket Mode
HCP_SLACK_CHANNEL=C0123456789        # where requests are posted

The server reads hcp.env only when it starts, so restart it after a change: launchctl kickstart -k gui/$(id -u)/com.hcp.server. On a network that inspects HTTPS, such as Cisco Umbrella, the server may not be able to reach Slack.

Creating the Slack app, connecting Claude Code and MCP harnesses, every setting, and troubleshooting are covered in the README.

A small REST API

Every /v1 endpoint takes Authorization: Bearer <key>. An agent's key works only on that agent's requests.

POST/v1/requestsSubmit a coordination request
GET/v1/requests/{id}Read one. Reading your answered request takes delivery of the answer
GET/v1/requestsList your requests, with filters
DELETE/v1/requests/{id}Withdraw a request
POST/v1/requests/{id}/respondAnswer one. Needs a key with the respond permission
GET/v1/auditAudit events
GET/v1/eventsState changes as they happen, over SSE
GET/v1/metricsCounts, response times and open requests, for the dashboard. Admin keys only
GET/v1/statusVersion, uptime and connector health. Admin keys only
POST/v1/status/{connector}/testCheck the database, Slack or the vault now. Admin keys only
GET/healthHealth check

Every request follows a defined lifecycle

A request is only waiting on you once it has actually been delivered. One that never reaches Slack goes straight from routing to timed out.

Request lifecycle A request moves from SUBMITTED to ROUTING to PENDING_RESPONSE. From there it is answered and becomes RESPONDED then DELIVERED, or it is ESCALATED once and routed again, or it becomes TIMED_OUT. A request that cannot be delivered goes from ROUTING to TIMED_OUT. Any active request can be CANCELLED. SUBMITTED ROUTING delivered never delivered PENDING_RESPONSE ESCALATED routed again, once TIMED_OUT terminal RESPONDED DELIVERED terminal Any active → CANCELLED

How a request ends

DELIVERED: answered, and the agent has the answer. TIMED_OUT: nobody answered, or it could not be delivered. CANCELLED: the agent withdrew it.

What happens at the deadline

The agent chooses when it asks: AUTO_REJECT, AUTO_APPROVE, ESCALATE to a second person, or simply time out (BLOCK, FAIL, SKIP).

What it is made of

143 tests. The end-to-end ones run the real server and the real binary against a throwaway Postgres and a stand-in for Slack. Slack and the Claude Code hook have also been checked by hand against a real workspace. The original TypeScript service is archived in archive/typescript.

Rust Tokio Axum SQLx and Postgres rmcp, the official MCP SDK Slack Socket Mode Obsidian Markdown launchd Tauri ULID identifiers