Codecast
/install codecast
Codecast
Live-stream coding agent sessions to Discord. Zero AI tokens burned.
Setup
First-time setup: see references/setup.md for webhook creation, unbuffer install, bot token, and smoke test.
Invocation
Launch with exec background:true. Background exec sessions survive agent turns and OpenClaw fires notifyOnExit automatically when the process ends.
exec background:true command:"{baseDir}/scripts/dev-relay.sh -w ~/projects/myapp -- claude -p --dangerously-skip-permissions --output-format stream-json --verbose 'Your task here'"
Note the session ID from the response — use it to monitor via process.
Options
| Flag | Description | Default |
|---|---|---|
-w \x3Cdir> |
Working directory | Current dir |
-t \x3Csec> |
Timeout | 1800 |
-h \x3Csec> |
Hang threshold | 120 |
-n \x3Cname> |
Agent display name | Auto-detected |
-r \x3Cn> |
Rate limit (posts/60s) | 25 |
--thread |
Post into a Discord thread | Off |
--skip-reads |
Hide Read tool events | Off |
--review \x3Curl> |
PR review mode | — |
--parallel \x3Cfile> |
Parallel tasks mode | — |
--resume \x3Cdir> |
Replay session | — |
For PR review, parallel tasks, Discord bridge, and Codex structured output: see references/advanced-modes.md.
Agent Launch Checklist
- Start background session → note session ID and PID from response
- Post to dev channel → announce agent name, workdir, task
- Write breadcrumb for completion routing:
echo '{"channel":"\x3Cinvoking-channel-id>","relayDir":"\x3Crelay-dir>","pid":\x3CPID>}' > /tmp/codecast-pending-\x3CPID>.json - Log to daily memory → session ID, relay dir, invoking channel
The breadcrumb file tells the heartbeat precheck where to post results when the session completes. It auto-detects completion by checking if the PID is still alive.
That's it. When the process ends, OpenClaw's notifyOnExit fires a system event + heartbeat request. The heartbeat handler reads the result from the relay dir's stream.jsonl and posts to the invoking channel.
Completion Detection
OpenClaw handles this natively:
tools.exec.notifyOnExit: true(default) — system event + heartbeat on process exit- Heartbeat precheck script detects completed sessions via
/tmp/dev-relay-sessions/ - No cron watcher needed
Backup: Append this to the inner agent's prompt for an additional signal:
When completely finished, run: openclaw system event --text "Done: \x3Cbrief summary>" --mode now
Monitoring
process poll sessionId:\x3Cid> # Check status
process log sessionId:\x3Cid> # View recent output
process kill sessionId:\x3Cid> # Stop session
Agent Support
| Agent | Output Mode | Status |
|---|---|---|
| Claude Code | stream-json | Full support |
| Codex | --json JSONL | Full support |
| Any CLI | Raw ANSI | Basic support |
Session Tracking
- Active sessions:
/tmp/dev-relay-sessions/\x3CPID>.json(auto-removed on end) - Event logs:
/tmp/dev-relay.XXXXXX/stream.jsonl(7-day auto-cleanup) - Interactive input:
process submit sessionId:\x3Cid> data:"message"
Reference Docs
- Setup guide — first-time install, webhook, bot token
- Advanced modes — PR review, parallel tasks, Discord bridge, Codex
- Discord output — message formats, architecture, env vars, troubleshooting
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install codecast - 安装完成后,直接呼叫该 Skill 的名称或使用
/codecast触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Codecast 是什么?
Stream coding agent sessions (Claude Code, Codex, Gemini CLI, etc.) to a Discord channel in real-time via webhook. Use when invoking coding agents and wantin... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1554 次。
如何安装 Codecast?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install codecast」即可一键安装,无需额外配置。
Codecast 是免费的吗?
是的,Codecast 完全免费(开源免费),可自由下载、安装和使用。
Codecast 支持哪些平台?
Codecast 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Codecast?
由 Allan Jeng(@allanjeng)开发并维护,当前版本 v4.1.0。