wake-claude-code-on-a-mention

Wake Claude Code on a mention

A catch pushes results directly to a Claude Code slash command, so Claude Code wakes and acts on a brand mention without polling. The MCP server is planned for roadmap phase 3; the REST API and catches are the surface now.

alertresult

What it does

  1. 1

    Step 1

    Register a catch with your product name as the query and claude_code as the destination type. Name the slash command that should handle the mention and set the working directory where Claude Code runs.
  2. 2

    Step 2

    When the catch fires, discatch sends the results and suggested action to the command. Claude Code receives the full event payload: catch_id, delivery_id, results with URLs and excerpts, and a suggested_action string.
  3. 3

    Step 3

    Your agent decides what to do. Common patterns: file a GitHub issue for bug reports, draft a reply for questions, add a todo to a tracking list, or trigger a CI pipeline. discatch does not run your agent or decide what it does with the results.
  4. 4

    Step 4

    Test the destination before going live. POST /v1/catches/{id}/test sends a sample payload so you can verify the command parses it correctly before real mentions arrive. The sample payload has the same shape as a real delivery.
  5. 5

    Step 5

    Combine with classify to have discatch label each result by intent before the command runs. Your slash command receives results that already carry sentiment, relevance, and an intent label, so it can skip its own classification step.
  6. 6

    Step 6

    This playbook ships as a SKILL.md in the dcouple/discatch-playbooks repo so skills.sh and agent skill directories pick it up.

Sources it watches

HNHacker NewsDCDiscourseGHGitHubWWWWeb

Common questions

Does Claude Code need to be running for the catch to deliver?

The claude_code destination calls a local runner or reaches Claude Code through Pane. If the runner is not reachable when the catch fires, the delivery retries five times over six hours with exponential backoff. After the last attempt the delivery goes to the dead letter log, visible at /v1/catches/{id}/deliveries. The catch keeps running and tries again on the next firing.

What slash command should I use?

Any slash command your project defines. The payload arrives as the command’s argument in JSON. A common pattern is /handle-mention, which reads the results array and branches by intent: file an issue for bug reports, add a todo for questions, or send a Slack message for comparisons. The SKILL.md in the playbooks repo includes a starter command.

Can I use Codex instead of Claude Code?

Yes. Change the destination type from claude_code to codex. The payload shape is the same. Both destinations work on every paid plan. The difference is which agent runtime receives the call. If you use a different agent harness, use the webhook destination type and point it at your own endpoint.

How is this different from polling with MCP?

MCP is pull-only by spec. When the discatch MCP server ships (planned, roadmap phase 3), an agent using it would still have to poll for new mentions. A catch pushes: discatch wakes your agent only when something appears. Polling at 15-minute intervals means 96 search calls a day whether mentions exist or not. A catch that fires nothing costs nothing. Push is the gap no other listening tool fills today.

What does this cost per mention?

One alert unit per firing plus one result unit per item delivered. The quote on each delivery says exactly what was charged. Catches with no new results cost nothing. Run POST /v1/quote with the catch body and dry_run set to true to see the ceiling before you register the catch.

Can I watch multiple products with one catch?

Yes. Use OR in the query: "product a" OR "product b" OR "domaina.com" OR "domainb.com". All matching results land in the same slash command. If you want separate handling per product, register one catch per product with a different command or different working directory.

Last reviewed by , founder, dcouple. Copy from docs/playbooks.md.