Agent Skills › agent-substrate/substrate › actor-lifecycle-triage

actor-lifecycle-triage

GitHub

用于排查 Agent Substrate 中 Actor 状态异常(如卡住、崩溃或无响应)的诊断技能。通过读取 Actor 状态、检查 Worker 和 Atelet,并对照参考表匹配症状,定位根因并提供证据。

.agents/skills/actor-lifecycle-triage/SKILL.md agent-substrate/substrate

Trigger Scenarios

Actor 状态异常 Actor 崩溃 Actor 卡住

Install

npx skills add agent-substrate/substrate --skill actor-lifecycle-triage -g -y
More Options

Non-standard path

npx skills add https://github.com/agent-substrate/substrate/tree/main/.agents/skills/actor-lifecycle-triage -g -y

Use without installing

npx skills use agent-substrate/substrate@actor-lifecycle-triage

指定 Agent (Claude Code)

npx skills add agent-substrate/substrate --skill actor-lifecycle-triage -a claude-code -g -y

安装 repo 全部 skill

npx skills add agent-substrate/substrate --all -g -y

预览 repo 内 skill

npx skills add agent-substrate/substrate --list

SKILL.md

Frontmatter
{
    "name": "actor-lifecycle-triage",
    "description": "Finds why an Agent Substrate actor is stuck in a state, CRASHED, refuses a lifecycle call, or is RUNNING but not answering. Use after the troubleshoot skill picks the actor lifecycle area, or directly when one actor's state looks wrong. Reads the actor, its worker and atelet, matches the symptom against the reference tables, and reports the root cause with evidence. Read-only."
}

Actor lifecycle triage

Follow the rules, fact collection, and report format in the troubleshoot skill. This skill covers one actor.

Actor states are RESUMING, RUNNING, SUSPENDING, SUSPENDED, CRASHED, DELETING, and REVERTING. New actors start SUSPENDED. A resume call (or an incoming request through atenet-router) moves an actor to RUNNING, and it stays RUNNING until explicitly suspended. The only way out of CRASHED is kubectl ate revert actor, which resets the actor to SUSPENDED at its last uploaded snapshot.

1. Read the actor

kubectl ate get actor <actor> -a <atespace> -o yaml

Note:

  • status.state, and how long it has stayed there.
  • status.crash.message and status.crash.crashTime, if CRASHED.
  • status.workerAssignment: the worker pod, its namespace and pool (cleared when the actor is CRASHED).
  • status.assignedNode (kept even when CRASHED).

2. Check the worker and atelet

A resume, suspend, or revert calls atelet on the assigned node, which calls the worker. Check atelet on status.assignedNode, and check the worker pod if status.workerAssignment is set:

kubectl -n <worker-namespace> get pod <worker-pod> -o wide
kubectl -n ate-system get pods -l app=atelet -o wide --field-selector spec.nodeName=<node>
kubectl ate get workers

When the actor is CRASHED, status.workerAssignment is empty, while status.assignedNode still names the node for the atelet lookup.

For worker-caused crashes (pod gone, worker restarted, or a sandbox crash reported by the worker), find the former worker in ate-api-server logs near status.crash.crashTime under Releasing actor from a worker whose pod is gone, Releasing actor from a restarted worker, or Worker reported an actor crash. Each line carries a worker attribute (the Worker name, which is also the worker pod's UID):

# If the Worker still exists, this gives its pod name and namespace:
kubectl ate get worker <worker> -o yaml
# If the worker pod was deleted, look up its events by UID.
# Kubernetes keeps events for about an hour by default, so an empty result for
# an older crash does not rule out eviction or deletion:
kubectl get events -A --field-selector involvedObject.uid=<worker>

For other crashes (atelet errors, draining or ineligible workers, snapshot state conflicts), those three lines do not appear. Use status.assignedNode to check atelet logs and inspect ate-api-server logs for the actor near status.crash.crashTime.

A missing worker pod or an unready atelet on the node causes most stuck and crashed actors. Note what you find for step 3.

3. Match the symptom

Pick the section of references/states.md that matches the actor:

Symptom Section
Stuck in RESUMING, SUSPENDING, REVERTING, or DELETING Stuck in a transition
CRASHED CRASHED, by status.crash.message
Call refused with FailedPrecondition Call refused
RUNNING, but requests or logs show it is not working RUNNING but not working

Run the Confirm check before calling a root cause. Treat state-changing steps like revert and resume as recommendations and confirm with the user before running them. These logs are useful across all cases:

# ate-api-server runs every lifecycle call and logs each one as `Handle RPC`,
# with the request and the error. It runs more than one replica.
kubectl -n ate-system logs -l app=ate-api-server -c ate-api-server \
  --since=1h --tail=-1 --prefix | grep '<actor>'
# The actor's lifecycle events on its current worker. Works only while RUNNING.
kubectl ate logs actor <actor> -a <atespace> --source=lifecycle

4. Known gaps

  • If an application process exits while its sandbox stays up (#2972), or a process inside the sandbox or guest is OOM-killed without killing the sandbox (#3615), the actor stays RUNNING (see #2211).
  • A dead sandbox or microVM, or one killed for exceeding its memory limit, is usually reported as CRASHED, but the actor stays RUNNING when reporting fails: on gVisor if the worker could not watch the sandbox (Cannot watch the sandbox, a crash will go unreported), or on either runtime if reporting fails for 5 minutes (Failed to report the actor crashed).
  • ate-api-server does not retry failed lifecycle calls. After a retriable error, the actor stays in its transition state until the caller retries.
  • During an atelet rollout, a resume or suspend hitting that node fails with Unavailable (or Internal with no atelet pod found on node while no pod exists). Running actors are not affected.
  • kubectl ate logs actor streams only while the actor is RUNNING. For earlier logs, use the cluster's log backend.

5. Report

Use the report format in troubleshoot, with Area: actor lifecycle.

Version History

  • c0cfd4f Current 2026-12-01 07:53

    更新崩溃处理逻辑:要求执行revert/resume前确认;文档化崩溃时workerAssignment清空但保留assignedNode;新增从日志查找旧Worker的方法;优化只读规则范围。

  • 7319f1a 2026-11-27 19:01

Same Skill Collection

.agents/skills/detect-flaky-tests/SKILL.md
.agents/skills/post-draft-review/SKILL.md
.agents/skills/review-crds/SKILL.md
.agents/skills/security-status-report/SKILL.md
.agents/skills/triage-issues/SKILL.md
.agents/skills/troubleshoot/SKILL.md
.agents/skills/agents-md/SKILL.md

Metadata

Files
0
Version
15538f0
Hash
48a16dc3
Indexed
2026-11-27 19:01

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-12-01 21:51
浙ICP备14020137号-1