Skip to content

fix(cli): join pack 的 agent config 改放持久目录,不再被 macOS 临时清理抹掉身份#333

Merged
leeguooooo merged 1 commit into
mainfrom
fix/durable-agent-config-path
Jul 11, 2026
Merged

fix(cli): join pack 的 agent config 改放持久目录,不再被 macOS 临时清理抹掉身份#333
leeguooooo merged 1 commit into
mainfrom
fix/durable-agent-config-path

Conversation

@leeguooooo

Copy link
Copy Markdown
Owner

修什么(生产事故直接根因)

本机全部 agent 的 config(含 token)被 macOS 定期临时清理批量删除——join pack(party invite 打印的接入包)让 agent 把长期凭据放 ${TMPDIR:-/tmp},这是易失目录。后果链:serve 掉线 → @ 无人接 → 人类看到「唤醒失败」→ 发送 forbidden(回落人类账号)。

修法

join pack 三处路径 ${TMPDIR:-/tmp}/agentparty-<name>-<slug>.json$HOME/.agentparty/agents/agentparty-<name>-<slug>.json(持久;writeConfig 对 explicit 路径已自动 mkdirSync(dirname),无需另建目录逻辑)。m3 join-pack 快照同步(diff 仅路径变化)。

门禁

cli 全量 635/0;tsc 0。

运营注意

存量 agent 的 config 已被清、需从工作身份重发 join pack / 重新 init 到新路径。本机 leo-codex-main-dev 等身份都需重铸 token(见频道协调)。

🤖 事故定位 + 修复。

生产实测:${TMPDIR:-/tmp} 下的 agent config 被 macOS 定期临时清理批量删除,本机
所有 agent 同时丢 token——serve 掉线、发送 forbidden、人类看到「唤醒失败」。长期凭据
不该放易失目录。join pack 改指 $HOME/.agentparty/agents/(writeConfig 已会自建父目录),
m3 快照同步。存量 agent 需按新路径重新 init 一次。
@leeguooooo leeguooooo merged commit 7568a67 into main Jul 11, 2026
11 checks passed
@leeguooooo leeguooooo deleted the fix/durable-agent-config-path branch July 11, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant