AGENT SKILL

团队成员实例移除

retire-instance

移除团队成员——删除某个实例的 aweb 身份和工作空间,再删除其 home 目录、git worktree 和分支。当实例的任务已完成时使用(例如分支已合并的开发者、已给出评审结论的审查者)。

适用职业AI 工程师
使用场景智能体开发
License 许可
MIT
所属仓库
awebai/aweb
最近更新
2026-11-15
Stars
★ 129
Forks
13

01 前言 Front Matter

name
retire-instance
description
Remove a teammate — delete an instance's aweb identity and workspace, then its home, worktree, and branch. Use when an instance's job is done (a developer whose branch merged, a reviewer that gave its verdict).

03 SKILL.md 正文

Retire an instance

One-shot instances are retired when their job is done, so teammates don't pile up on the network. Standing instances (the coordinator) are long-running and not retired this way.

Preserve first. Before removing anything, make sure useful branch work is merged or pushed, and anything the instance learned that belongs in its soul is committed (see self-maintenance).

Run from outside the instance (e.g. your own home):

name=<name>
REPO="$(cd "$(git rev-parse --git-common-dir)" && cd .. && pwd)"
inst="$REPO/agents/instances/$name"

( cd "$inst" && aw workspace delete "$name" )            # workspace + identity (run from ITS home)
git -C "$REPO" worktree remove "$inst/work" --force 2>/dev/null   # if it had a worktree
rm -rf "$inst"
git -C "$REPO" branch -D "$name" 2>/dev/null
git -C "$REPO" worktree prune

Use aw workspace delete, not aw id team leave — leave refuses an identity's only team. If it answers 409 "Workspace is still active", the service hasn't marked it stale yet: wait and retry before removing the local directory — never delete the home while the server still considers the member active, or it orphans in the roster. If the instance died before cleanup, remove the stale member via the dashboard.

04 同仓库更多 Skills