fix(cli): join pack 的 agent config 改放持久目录,不再被 macOS 临时清理抹掉身份#333
Merged
Conversation
生产实测:${TMPDIR:-/tmp} 下的 agent config 被 macOS 定期临时清理批量删除,本机
所有 agent 同时丢 token——serve 掉线、发送 forbidden、人类看到「唤醒失败」。长期凭据
不该放易失目录。join pack 改指 $HOME/.agentparty/agents/(writeConfig 已会自建父目录),
m3 快照同步。存量 agent 需按新路径重新 init 一次。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修什么(生产事故直接根因)
本机全部 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(见频道协调)。
🤖 事故定位 + 修复。