Documentation
The snippet system

How agent snippets work

cast install writes versioned instruction sections into your agents' own config files. This is the mechanism every other guide builds on.

Codecast's agent features share one delivery mechanism: a snippet is a markdown section that cast install writes into the instruction files your coding agents already read. Claude Code reads ~/.claude/CLAUDE.md. Codex reads ~/.codex/AGENTS.md. Cursor reads rules files under ~/.cursor/rules/. A snippet teaches the agent a capability — "you can message other sessions", "you can set a trigger", "track your work as tasks" — in the place the agent already looks for instructions.

This guide explains the mechanism. Each capability has its own guide: memory, messaging, pinned thread state, ambient awareness, forks and spawn, tasks and plans, triggers, workflows, orchestration, the visual canvas, and published pages.

The install flow

cast install runs an interactive wizard. It walks through every snippet, shows what each one does and which files it writes to, and asks yes or no. Nothing is installed without your answer.

$ cast install            # interactive wizard, one prompt per snippet
$ cast install messaging  # enable one snippet, no prompts
$ cast install --all      # enable everything
$ cast install messaging --disable   # turn one off
$ cast install --disable  # turn everything off

The single-snippet form is what the web Settings page shells out to when you toggle a snippet for a device, so the CLI and the web control are the same code path.

The catalog today: memory, messaging, state, forks, tasks, triggers, workflows, visual, publish, orchestration, plus stable. Stable is the odd one out — it is a session start hook rather than a markdown section, and it has three states (solo, team, off) instead of on and off. The ambient awareness guide covers it.

Where snippets are written

Every install targets each agent config present on the machine:

TargetWhen
~/.claude/CLAUDE.mdalways
~/.codex/AGENTS.mdwhen ~/.codex exists
~/.cursor/rules/codecast.mdcwhen ~/.cursor exists

Files are written with mode 0600 (owner read and write only). Codecast never touches project-level CLAUDE.md files — the snippets live in your user-level config, so every project gets them and your repos stay clean.

Markers make installs idempotent

Each snippet is delimited by its heading (for example ## Messaging) and an HTML comment end marker (<!-- /codecast-messaging -->). The installer looks for both:

  • Neither present: append the snippet to the end of the file.
  • Both present, installing: do nothing. Running cast install twice never duplicates a section.
  • Both present, updating: cut the old section from heading to marker and append the fresh one.

The installer also recognizes headings older CLI versions wrote (for example ## Publishing HTML artifacts before the section became ## Publishing pages), so an update replaces the old section instead of stacking a second copy under it.

Anything you write outside the markers is yours. The installer only ever replaces the region it owns.

Versioning and self-updates

Every snippet has a version number compiled into the CLI. Your config at ~/.codecast records which version of each enabled snippet is installed. When the CLI updates and a snippet's version bumped, the next cast run rewrites the enabled sections in place — so improved wording, new commands, and new flags reach your agents without you re-running the wizard.

One snippet goes further: messaging is on by default for anyone with memory enabled, and the daemon installs it on its own at startup after a self-update — no cast command involved. An explicit opt-out (cast install messaging --disable) is always respected.

The shared "Referencing objects" section

Sessions, tasks, plans, triggers, and docs all have short IDs (jx7c6zk, ct-4102, pl-88, tr-42). Write one in prose anywhere in codecast and it renders as a live reference card. Rather than each snippet teaching its own object's ID format, a single ## Referencing objects section explains all of them. Any snippet that introduces an object installs this section alongside itself. It is written once per file and refreshed in place, so enabling five features still yields exactly one copy.

Per-device control from the web

The daemon reports its snippet settings on every heartbeat, and the Settings page renders a toggle per snippet per device. Flipping a toggle sends the change to that machine's daemon, which runs the same non-interactive install path as cast install <name>. The catalog descriptions you see in the wizard, in cast install -h, and on the web all come from one shared source, so they cannot drift apart.

More guides
Give Claude Code memory across sessions and teammates
Not notes files: every session can search, read, and watch every other session your team has run. The commands, the scopes, and how agents use them.
How to search your Claude Code history across every machine
Claude Code keeps sessions on the machine that ran them. The built in picker, two local search tools, and how codecast searches every machine and every agent at once.
How to find which AI agent session wrote a line of code
git blame names whoever committed a line. cast blame names the agent session that wrote it and opens the exact message; Git AI and Agent Blame solve it with git notes instead.
Messaging between sessions
cast send turns sessions into teammates: any session can message any other, including a teammate's, and manage what the human sees in the inbox.
Ambient awareness
Stable mode injects a live feed of recent sessions into every new session at start. Combined with messaging, sessions know about each other without being told.
See your whole team's Claude Code sessions in one place
Claude Code already writes every session to disk. The codecast daemon syncs those files — plus Codex, Cursor, and Gemini — into one live team feed, inbox, and searchable record.
How to share a Claude Code session with your team
Three different asks hide behind that sentence: read a finished conversation, watch a running one, or make every session visible by default. What Anthropic ships, what Lore does, and where codecast fits.
Pinned thread state
cast state keeps one agent-written line saying where a thread stands, pinned above the composer and on the inbox card, with its staleness on show.
Decisions: asking without interrupting
cast decide puts a question, its options and the reasoning into a queue you clear when you choose to. The answer returns to the agent as a message.
Team chat that agents take part in
Channels, threads and direct messages where a mention can wake a role or a session, agent lines are capped, and a Slack workspace mirrors in.
Huddles and walkie
Every huddle is transcribed with exact speaker attribution and leaves a digest, so an agent can quote what was said on the call.
Forks and spawned sessions
cast spawn --subagent delegates a worker that nests under the session that launched it; plain cast spawn and cast fork start independent threads in the human's inbox.
Tasks and plans
The work tracking layer agents report into: tasks, plans, binding, comments, and the dashboard that watches it all.
Triggers
Follow-up work that runs after the session ends: delayed, recurring, or fired by a GitHub event.
Workflows
Execution graphs in DOT syntax: agent steps, shell commands, conditions, and human approval gates.
Orchestration
A conductor agent decomposes a plan, spawns implementers in isolated worktrees, and runs reviewers and critics over the result.
Pull requests and issues as codecast objects
cast pr and issue sync keep a copy of GitHub and Linear objects current from webhooks, send every action back, and wake the session that owns the work.
The org: roles, scopes and the line
Route work to a standing responsibility instead of a session: roles with scopes, wakes, proposals a person accepts, and a line that reviews before it ships.
Driving the human's own Chrome
cast browser works in a background tab of the Chrome that already holds your logins, and puts the evidence in the thread.
Driving a native macOS app
cast computer reads a window as an indexed tree, refuses stale indexes, and reports whether an action was verified.
One typecheck watcher for every session
cast check answers every session from one tsc --watch for each tree and project, so thirty agents do not build the same program thirty times.
The cast-* skills
23 packaged procedures, compiled into the CLI, each a fixed sequence of ordinary cast commands.
Sessions on machines you are not sitting at
How a session starts on, moves to, sleeps on and is watched from another machine, and what each lease does when the machine goes away.
Usage limits are a pause
Codecast parks a session that hits a limit, then continues it at the reset or on a saved account that still has room.
The visual canvas
Agents reply with sandboxed HTML that renders inline: charts, dashboards, diagrams, and small widgets instead of ASCII art.
Published pages
cast publish turns a file into a page at a stable URL, with version history, access gates, and viewer comments that flow back to the session.
How the client syncs
Every surface paints from a local store, an append only log for each scope delivers only what changed, and one window syncs while the others copy it.