zchee / zchee/ganja-code

Server-tool call counter in /usage

Open
#95 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

idea size:S verdict:do
Dominant language
Rust
Stars
2
Forks
0
Avg merge
1h
Merged PRs (30d)
17

Description

What it does

Counts, per session, the calls a provider ran for a configured server tool, and shows the count as a row in /usage.

Source

ganja-code-g20i (a per-session server-tool call counter in /usage).

The bead is closed when this issue is published, with its external reference pointing here (#38).

File and line references in this issue are to main as of 75a7a92.

Against the three criteria

  • Direction (README): The README's only word on cost is that 10,000 subagents "is a budget question" (README.md:28-29).
  • Today's terminal users: A configured server tool bills per call and nothing counts the calls; the billing is why D489 made server tools opt-in.
  • Evidence: D563's plan named the counter as a risk mitigation and deferred it. The event already carries the tool's name (ProviderEvent::ServerTool).

Depends on

Nothing. The work is a fold in the engine plus one row in /usage.

Verdict

  • Verdict: do
  • Size: S — one commit, no plan.
  • Exception to the probe rule: no.
  • Date: 2026-09-19
  • Verdict ticket: #45

Theme: #58

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the engine handling ProviderEvent::ServerTool and trace how the per-session state is folded into the /usage view. Confirm the configured server tool name is available in the event, then add the usage row and verify that its count is correct for each session.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.