feature: agentop observe — group sessions and cost by working directory
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with cmd/agentop/tui/sessions_pane.go, session_metadata.go, and sessions_title.go, then read the read-claude-sessions harvest in cmd/agentop/cmd_experimental.go and the Agents pane breakdown. The issue leaves key decisions open about directory source, grouping rules, changed working directories, and API exposure. Done means directory grouping and cost totals are available in the Sessions pane and agentop cost, with corresponding updates to cmd/agentop/README.md.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
agentop observe now shows the cost of each session, so it is easy to see which tasks cost the most. Answering "where did my tokens go this month?" still means adding up sessions by hand, because nothing groups them by the project they ran in. The working directory is the natural key for that: one repo or checkout is usually one project.
Today the directory only appears by accident. The Claude Code title harvest (~/.cortex/session-metadata.json) falls back to the working directory as a session's title when the transcript has no model-generated one, so some rows show a path in TITLE and others don't. Codex, Bob, OpenCode and Pi sessions show no directory at all.
Proposal
Record each session's working directory and let the viewer group and total by it:
- A
DIR(orPROJECT) column in the Sessions pane, separate fromTITLE. - A way to group or scope by directory, like the Agents pane does by agent: one row per directory with
SESSIONS,LAST SEENandCOST <window>, and↵scopes sessions, usage and the$band to it. - The same breakdown in
agentop cost, so a monthly total per directory can be scripted.
Open questions:
- Where does the directory come from per agent? Claude Code records
cwdin its transcripts (the title harvest already reads them). Codex records it in its session files. For other agents it may need the process's cwd, looked up from the pid the proxy already attributes calls to. - Group by the exact path, or by repository root (so
repo/andrepo/sub/count together)? Worktrees under.claude/worktrees/probably belong with their repo. - A session whose directory changes partway through (
cdin a shell agent): first directory, or last? - Is the path sensitive enough to keep out of the session API by default? It is already in
session-metadata.jsonfor Claude Code.
Context
Requested in #cortex-community by @vinodmut (2026-11-09), who uses the per-session cost to compare models and agents (Codex vs Claude Code) and to account for monthly token use.
Where it lives
cmd/agentop/tui/sessions_pane.go,session_metadata.go,sessions_title.gocmd/agentop/cmd_experimental.go(read-claude-sessionsharvest)- The Agents pane, as the model for a per-directory breakdown
cmd/agentop/README.md: the Sessions pane section and the column table
Assisted-By: Claude (Anthropic AI) [email protected]
- Ngôn ngữ chính
- Go
- Star
- 26
- Fork
- 46
- Merge trung bình
- 13 giờ 49 phút
- Pull request đã merge (30 ngày)
- 244
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rossoctl/cortex
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Feat: Keep coding agents working when the Cortex proxy stopsCó thể đã có người làm @huang195 đã nhận hôm nay. Đang mở
rossoctl/cortex#1738 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Phase C: Let Praxis core accept CONNECT and decrypt, and remove the Go front doorCó thể đã có người làm @huang195 đã nhận 2 ngày trước. Đang mởlaptop
rossoctl/cortex#1728 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Phase D: Move the Cortex store, pricing, session API and attribution into the binaryCó thể đã có người làm @huang195 đã nhận 2 ngày trước. Đang mởlaptop
rossoctl/cortex#1727 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Phase B: Send absolute-form requests to Praxis and remove the egress listenerCó thể đã có người làm @huang195 đã nhận 2 ngày trước. Đang mởlaptop
rossoctl/cortex#1726 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rossoctl/cortex
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
tomasz-tomczyk/crit#1159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SelectOneHealthyInstance panics when instance weights are fractional (e.g. 0.5)Có thể đã có người làm @Ajax-1 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
nacos-group/nacos-sdk-go#929 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
google/osv-scanner#3270 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Batch JSON validation reports the wrong input indexCó thể đã có người làm @Dazhou-del đã nhận hôm nay. Đang mởtype/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
gin-gonic/gin#4928 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 6 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày