Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#119 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
ai-infra-agents

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Rust
Star
4
Fork
0
Merge trung bình
5 giờ 32 phút
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jeffkit/recursive

Tất cả issue của jeffkit/recursive

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.