Files
val-blog/org/SUBAGENT_LOGGING_POLICY.md
T

30 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Subagent Logging Policy (v1)
目标:让每个 subagent 的执行都可追溯、可审计、可复盘。
## 保留内容
对每次 subagent 运行,保留以下日志:
1. 任务指令(spawn task
2. 对话消息(assistant/user/system
3. 工具调用与工具结果(includeTools=true
4. 运行结果与输出文件路径
5. 原始会话 transcriptjsonl
## 保留位置
- 原始 transcript: `~/.openclaw/agents/main/sessions/<sessionId>.jsonl`
- 工作区归档副本: `org/logs/subagents/<timestamp>/`
- 索引清单: `org/logs/subagents/<timestamp>/INDEX.md`
## 执行规则
- 所有 `sessions_spawn` 默认使用 `cleanup: keep`(防止会话被提前归档删除)。
- 每轮调度结束后,执行一次日志归档脚本。
- 如需人工复盘,优先查看 `INDEX.md`,再按 sessionId 打开对应 jsonl。
## 说明
- “模型内部隐式推理(未暴露给会话的思考)”不保证可导出;
但会话中可见的 thinking/tool/messages 会完整保留在 transcript 与 history 中。