fix(multi): 子 agent/worker 的事件与 usage 被 NullSink 吞掉——父会话里 worker 是黑盒且成本系统性低估
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
Start in src/tools/agent.rs: read build_worker_runtime (~596-607) alongside the builder's default in src/runtime/builder.rs:90,265 to see that no event_sink or storage is ever attached, then follow run_worker (~641-683) and the background append_output path (~757-770) to see where outcome.usage/llm_latency_ms are dropped. Done means a worker runtime wired to a CompositeSink carrying a worker_id/task_id prefix, and worker usage folded back into the parent session's cost accounting; runtime visibility of that flow still needs Langfuse (#124), so acceptance here is diff-level per point.
由索引模型根据 Issue 内容生成。
描述
场景 gap 单(okguitar 提报)· 优先级 P1 · 依赖:无 · 验收:代码 diff 逐点核对;运行时可见性另需 Langfuse(#124)
基线 origin/main = fc29f3d4。
Summary
src/tools/agent.rs:596-607(build_worker_runtime)只设 llm/tools/max_steps/system_prompt/wall_timeout,不调.event_sink→ builder 默认 NullSink(runtime/builder.rs:90,265)。run_worker只取outcome.final_text/finish_label(agent.rs:641-683);outcome.usage生产代码无消费者;后台 worker 仅 append_output 纯文本(agent.rs:757-770);worker builder 也不注 storage → 用量无处落盘。
影响
parallel/团队 worker 卡在第几步、跑多久、烧多少 token,父侧(TUI/SSE/成本面板)全不可见;成本统计只算主 agent。#106 闭环了状态持久化,不含事件/用量回流。
建议
worker 运行时挂 CompositeSink(父 sink + worker_id/task_id 前缀);RuntimeOutcome.usage/llm_latency_ms 回注父会话 Usage/成本。
- 主要语言
- Rust
- 星标
- 4
- 派生
- 0
- 平均合并
- 5 小时 32 分钟
- 30 天内合并 PR
- 7
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
jeffkit/recursive 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 66/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 20/100
jeffkit/recursive#134 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
jeffkit/recursive#131 · 1 条评论 ·
维护者通常 1 天内回复
查看 jeffkit/recursive 的全部 Issue
相似的 Issue
-
feature request good first issue
难度 2/5 1-3 小时 新手友好度 85/100
TabularisDB/tabularis#853 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
andrewdavidmackenzie/jonesy#267 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 4 天内回复
-
`future_into_py` loses the original panic message可能已有人在做 @Danipulok 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 90/100
PyO3/pyo3-async-runtimes#91 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复