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.
An agent is about to do something it should not decide alone. Here is that one request in the three places it shows up.
Claude Code is about to force-push. The hook holds the command and asks you.
# 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
The request arrives in your channel and says what happens if nobody answers.
⚠️ Urgency: HIGH
Agent: claude-code
For: @isaac
Respond by: Today 12:22 PM — after that it is rejected
automatically
Summary
Claude Code wants to run: git push --force origin main
ID 01M7ADF336CWQ1VMM5SQMFZJ3Y
A note for the request, rewritten at every step, in the vault you already use.
CR_SUBMITTEDclaude-codeCR_ROUTINGsystemSLACK_NOTIFIEDsystemCR_PENDING_RESPONSEsystemCR_RESPONDEDslack:U07ISAACSLACK_INTERACTIONslack:U07ISAACCR_DELIVEREDclaude-codeNo 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.
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.
Installs as a launchd service. It starts at login, is restarted if it stops, and listens on localhost only unless you say otherwise.
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.
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.
There is no portal to keep open. Requests arrive in a Slack channel and you answer from your phone or your desk.
hcp opens an outbound connection to Slack (Socket Mode), so
a Mac behind a home router works as it is.| 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 log lives in your Obsidian vault as plain notes you can search, link and query, next to everything else you keep there.
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
- `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
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.
| 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 |
All three end in the same place: a request in Slack and a record in the vault.
Post a request, poll for the answer. Anything that can make an HTTP call can use it, with an API key per agent.
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.
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.
| 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.
An approval step that waves things through when something breaks is not an approval
step. These are the cases hcp is built around.
Answering through the API takes a key with a separate permission, one that agent keys are not given.
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 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.
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.
An unanswered request escalates once, to the person you named, with a fresh deadline. If they do not answer either, it times out.
An agent's key reads, cancels and collects answers for that agent's requests and nobody else's.
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.
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
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.
Every /v1 endpoint takes Authorization: Bearer <key>. An
agent's key works only on that agent's requests.
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.
DELIVERED: answered, and the agent has the answer. TIMED_OUT: nobody answered, or
it could not be delivered. CANCELLED: the agent withdrew it.
The agent chooses when it asks: AUTO_REJECT, AUTO_APPROVE, ESCALATE
to a second person, or simply time out (BLOCK, FAIL, SKIP).
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.