Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(multi): 子 agent/worker 的事件与 usage 被 NullSink 吞掉——父会话里 worker 是黑盒且成本系统性低估

Open
#119 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

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.

Written by the indexing model from the issue text.

Description

场景 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/成本。

Dominant language
Rust
Stars
4
Forks
0
Avg merge
5h 32m
Merged PRs (30d)
7

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from jeffkit/recursive

All issues in jeffkit/recursive

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.