Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,42 @@ N paired peers exchange structured digests each morning. The humans read
one summary compiled from N agent-to-agent conversations instead of
reading N threads.

## Token-efficient agent supervision

A supervised-agent setup runs one or more Claude Code sessions around the
clock via `/loop` scheduling, polling for work every 15 minutes. This burns
tokens even when nothing has changed — context accumulates across the long-
lived session, and each idle iteration still incurs the cost of re-reading
policy files and invoking coordination tools.

ClawdChan can replace parts of this pattern. Pair a dedicated worker node
(the Claude Code session) with a second node operated by the same human.
The second node runs the daemon and can act as a lightweight, non-LLM
dispatcher (see architecture below).

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text says “dispatcher (see architecture below)”, but this page doesn’t include an architecture diagram/section below. Either remove the reference or add the referenced diagram/anchor so readers can find it.

Suggested change
dispatcher (see architecture below).
dispatcher.

Copilot uses AI. Check for mistakes.

**Iteration digest.** At the end of each work iteration, the worker sends a
`ContentDigest` envelope — title: work item reference, body: what was done,
what's still pending, queue state — to the dispatcher peer. When the worker
session restarts or compacts, it reads the latest digest from
`clawdchan_inbox` to reconstruct state instead of relying on its
growing conversation context. The digest is fixed-size by construction;
conversation context is not.

**Event-driven dispatch.** Instead of blind polling, an external sidecar
(cron job, webhook listener, CI callback) detects new work and calls
`clawdchan send` on the dispatcher node's CLI. The worker's agent picks it
up on its next `clawdchan_inbox` call. This decouples "is there work?" (a
cheap non-LLM check) from "do the work" (an expensive LLM session), so
idle periods cost zero tokens.
Comment on lines +77 to +80

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clawdchan send CLI requires a thread id (or unique prefix), not just a peer, so an external sidecar needs a pre-existing thread and a way to resolve/store that thread identifier. It would help to mention this (or point readers to clawdchan threads / clawdchan open) to avoid implying send can directly address the worker without prior setup.

Suggested change
`clawdchan send` on the dispatcher node's CLI. The worker's agent picks it
up on its next `clawdchan_inbox` call. This decouples "is there work?" (a
cheap non-LLM check) from "do the work" (an expensive LLM session), so
idle periods cost zero tokens.
`clawdchan send` on the dispatcher node's CLI against the pre-existing
dispatcher↔worker thread. In practice, the sidecar must know that thread
id (or a unique prefix), either by storing it when the thread is created
with `clawdchan open` or by resolving it via `clawdchan threads` before
sending. The worker's agent picks the message up on its next
`clawdchan_inbox` call. This decouples "is there work?" (a cheap non-LLM
check) from "do the work" (an expensive LLM session), so idle periods cost
zero tokens.

Copilot uses AI. Check for mistakes.

**Important caveat.** Claude Code is reactive — a CC session cannot be woken
from outside. ClawdChan delivers the work item to the worker's inbox, but
the CC session must already be alive and polling `clawdchan_inbox` to see
it. The event-driven benefit comes from skipping expensive iteration logic
when the inbox is empty, not from keeping the session asleep. A separate
Comment on lines +78 to +86

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“idle periods cost zero tokens” conflicts with the later caveat that the CC session must already be alive and polling clawdchan_inbox (which still consumes some tokens). Consider rephrasing to reflect reduced/minimal token cost, or explicitly describe a workflow where the CC session is only started on demand by external orchestration.

Copilot uses AI. Check for mistakes.
orchestrator (systemd timer, launchd, or a supervisor daemon) is still
responsible for ensuring the CC session exists.

## What ClawdChan is not

- Not a public chat network. Pairing is explicit, no discovery.
Expand All @@ -60,3 +96,6 @@ reading N threads.
the human surface when hosting on OpenClaw; in Claude Code the host
surface is Claude itself.
- Not a file or state sync primitive.
- Not an orchestrator or scheduler. ClawdChan carries messages between
pairs; the decision of *when* to start or stop an agent session lives
in external tooling (systemd, launchd, cron, CI).
Loading