Documentation
Collaboration

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.

$cast install state

A long session is expensive to re-enter. The transcript holds everything the agent did, in order, which is exactly the wrong shape for the question you actually have when you open it: where does this stand right now? Threads that several sessions have been talking in are worse — half the messages are addressed to somebody else.

The pinned thread state answers that question in one place. The agent writes a short standing line about the situation, revises it as the work moves, and clears it when it stops being true. You see it above the composer the moment you open the session, and truncated on the inbox card before you open anything.

cast state "Waiting on CI for the auth fix — nothing to decide yet"
cast state - <<'EOF'                 # multi-line, exact newlines preserved
Status: sync layer rewritten, tests green
Blocked: needs a prod key before the last check
Next: deploy once the key lands
EOF
cast state                           # print the current state
cast state clear                     # remove it
cast state show <session_id>         # read another session's state

What the agent is told to write

The snippet (how snippets work) tells the agent to write for someone who has been away: what is happening now, what it is waiting on, what happens next, and whether anything is the human's to decide. It leads with the situation rather than the history, because the transcript is already the history.

Goal:, Status:, Next: and Blocked: render as bold labels, the same convention session summaries use, so a state written with them reads as a structured card rather than a paragraph.

The instruction the agent gets is not "write a state" but "keep one true". It rewrites the line whenever the answer changes — a new phase, a new blocker, a decision it needs from you — and clears it when the work is done. A state that says the agent is waiting on something that already arrived is worse than no state at all.

Declaring who acts next

The text says where the work stands. --status says who moves it forward, and that answer decides where the session files in the inbox when the turn ends.

--statusMeaningInbox section
workingStill moving. This is the defaultWorking
blockedA human must act before the agent can continueNeeds Input
doneDelivered, and nothing is stalled. Read it when you have timeDone
dormantA machine wakes the session: a trigger, a background task, a reply from another sessionDormant
cast state --status dormant "Waiting on CI run 8841. tr-42 checks again at 3pm"
cast state --status done "Shipped. All four fixes verified in the browser"

A finished turn that declares nothing files under Needs Input. That is the honest default, because nobody said otherwise, and it is also the cost of not declaring: you open the card to learn that it needed nothing.

done and dormant cover only the turn that declares them. When the wake arrives and the agent finishes that turn, it declares again or the session returns to Needs Input. A dormant state must name its wake in the text. An agent that cannot say what resumes it is blocked, not dormant.

blocked is the one status that claims your attention. It returns a stashed session to the inbox, so the snippet tells the agent to declare it only when it is true. A question that can wait goes to the decision queue first, and then the session goes dormant.

A message from you takes the declaration down, because you have answered it. A message from another session or a trigger wake leaves it standing.

Staleness is visible, not assumed

Nothing forces an agent to keep the line current, so the interface never claims it is. Every write stamps the message count of the thread at that moment, and every surface shows the gap since: "4m ago · 12 messages since".

As that gap grows the panel walks through three treatments — a cyan accent while the state is fresh, yellow once the thread has run well past it, orange when it has run far past. The card in the inbox dims its line the same way. A neglected state therefore reads as neglected instead of reading as current, which is the only thing that makes a pinned line trustworthy at all.

Time is the weaker signal and treated as such: a session parked overnight on a CI run has not changed, so the clock only takes over after the thread has been quiet for a long stretch.

Where it shows

SurfaceWhat you see
Conversation, above the composerThe full state, its age, and the message gap. Collapse it to the headline; clear it with the ×
Inbox cardThe first line, marked with a pin, in place of the generated session summary
cast sessionsThe same first line, marked, above the generated summary it replaces

Clearing from the panel is a local-first write: the panel disappears immediately and a toast offers Undo. The agent can pin a new state at any time — the human clearing it is a statement about this line, not a lock.

Access

cast state writes to the session it is run from — the CLI resolves the current session the same way cast stash and cast label do. Pass --for <session> to write to another session, and cast state show <session> to read one. Both are restricted to sessions you run or own, the same rule that governs renaming and stashing.

More guides
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.
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.
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.