kaku-runtime-test

kaku-runtime-test is a command for Claude Code from cklxx/elephant.ai. It costs 0 tokens per session (1,456 once invoked), scanned A, original, MIT.

An end-to-end test command for Kaku, a tool that manages programming-agent panes, together with Feishu messages and runtime monitoring. It starts from a simulated Feishu message and checks the full agent-team workflow.

In plain words
What is it for?
Use it to test launching Claude or Codex teams in Kaku panes, tracking heartbeats and stalled work, intervening when needed, and reporting completion or failure through Feishu.
Why use it?
Testing each internal component separately can miss failures between message intake, agent startup, monitoring, recovery, and notifications. This checks those connected steps as one process.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: positional $N argument; mentions Codex.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/bytedance/code/elephant.ai.

Good fit Use it to test launching Claude or Codex teams in Kaku panes, tracking heartbeats and stalled work, intervening when needed, and reporting completion or failure through Feishu.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kaku-runtime-test

README.md
[![agentmods](https://agentmods.dev/badge/commands/cklxx/elephant.ai/kaku-runtime-test.svg)](https://agentmods.dev/commands/cklxx/elephant.ai/kaku-runtime-test)
Your own site
<a href="https://agentmods.dev/commands/cklxx/elephant.ai/kaku-runtime-test"><img src="https://agentmods.dev/badge/commands/cklxx/elephant.ai/kaku-runtime-test.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01456
Opus 5 $0.00000 $0.00728
Sonnet 5 $0.00000 $0.00291
Haiku 4.5 $0.00000 $0.00146

Measured 7d ago against content hash 2d32fa97c54c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

kaku-runtime-test scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s http://localhost:9090/api/runtime/sessions | jq '.[].state'
.claude/commands/kaku-runtime-test.md · 148 lines

How it starts

The opening of the file, as written. The whole thing — 148 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/kaku-runtime-test — Kaku Runtime 集成测试

测试 Agent 用 Kaku 管理编程团队的完整端到端流程。 起点永远是 inject(模拟飞书消息),不直接调用内部 CLI。

参数: $ARGUMENTS(可选,如 TC-1TC-2 TC-4;不填则全跑)


测试场景概览

Agent 收到飞书消息后,通过 kaku-runtime skill 在 Kaku pane 中启动 CC/Codex 编程团队, 监控其执行,在卡住时介入,最终汇报结果。测试验证这整条链路。

用户飞书消息(inject)
  ↓
Agent(LLM + kaku-runtime skill)
  ↓  kaku cli split-pane → CC/Codex 启动
Kaku pane(TR 区域)
  ↓  CC 执行工具 → PostToolUse hook → notify_runtime.sh
runtime bus(:9090/api/hooks/runtime)
  ↓  heartbeat / stalled / completed 事件
StallDetector(60s 无心跳)→ LeaderAgent(决策:INJECT/FAIL)
  ↓
飞书通知(completed/failed)

Step 0 — 建立四宫格布局(独立新窗口)

# 新窗口建四宫格(不与用户当前窗口重叠)
eval $(bash scripts/kaku/layout.sh 4grid \
  --new-window \
  --cwd /Users/bytedance/code/elephant.ai \
  | grep -E "TOP_RIGHT|BOT_LEFT|BOT_RIGHT" \
  | awk '{print "export "$0}')

# BL:实时日志(runtime bus 事件 + 工具调用)
bash scripts/kaku/send.sh --pane-id $BOT_LEFT \
  "tail -f ~/code/elephant.ai/logs/alex-service.log | grep -E 'runtime_bus_event|TaskExecution|leader'"
┌──────────────────────┬──────────────────────┐
│   TL: Claude (当前)  │   TR: CC team panes  │
│  测试结果在此汇报     │  agent splits here   │
├──────────────────────┼──────────────────────┤
│   BL: 日志监控        │   BR: (空闲)       │
│  runtime_bus_event   │                      │
└──────────────────────┴──────────────────────┘

Step 1 — 运行测试

# 告知测试脚本:CC session 应 split 自 TR pane
KAKU_PARENT_PANE=$TOP_RIGHT \
bash scripts/test/kaku-runtime-e2e.sh $ARGUMENTS 2>&1 | tee /tmp/kaku-e2e-$(date +%H%M).log

测试用例

TC 场景 关键验证
TC-0 基础设施健康检查 HTTP 200 + bus 事件 + session API
TC-1 单 Agent 写文件 新 pane 出现 + heartbeat + 文件存在
TC-2 两个 Agent 并行 2 个不同 session_id + 2 个新 pane
TC-3 A→B 依赖任务链 两文件存在,B 晚于 A 的 completed
TC-4 Stall + LeaderAgent type=stalled + LeaderAgent 决策日志
TC-5 查询团队状态 reply 含 session 状态信息
TC-6 分析→实现→验证 3 个 session_id + 3 个输出文件
TC-7 手动注入恢复卡住的 session agent 使用 session inject 命令

Read the full file on GitHub · 148 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 148 lines · 0 tokens per session scan A 2d32fa97c54c

Subscribe to this mod's changes

kaku-runtime-test is a command published in the GitHub repository cklxx/elephant.ai (11 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,456 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.