cli: opencode stats reports no tool calls when all calls are still running
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- cli
Research direction
Start by tracing the opencode stats default card and compare how it counts calls with the detailed and JSON views; the payload does not name source files or tests. Reproduce with a single unfinished tool call and check that the card reports one call while leaving the success rate unavailable, then confirm it still reports no calls before any call and 100.0% success after completion.
Written by the indexing model from the issue text.
Description
Description
When the only tool call in the selected range is still running, the default opencode stats card says no tool calls. The detailed and JSON views correctly count that call. A success rate is not available yet, but that is different from zero calls.
Steps to reproduce
- Use a fresh project that has a single pending tool call, for example a question waiting for a reply, and no completed or failed calls in the range.
- Before the call finishes, compare
opencode stats --project . --days 1, the same command with--tools, and with--json. - The card says
no tool calls; the detail view says0 finished calls · 1 unfinished; JSON reportscalls: 1andunfinished: 1.
Verified with the production Core projector and stats collector in an in-memory database. A loopback fixture replayed their outputs to the unmodified CLI, which printed the same discrepancy in 3/3 runs. Controls: before the call the card correctly reported no calls; after successful completion it reported 100.0% tool success. No live provider or user database was involved.
OpenCode version
V2 dev at 22377659a8ed223f3eebc86660dd1a5bc2b33ca5 (2.3.0).
Operating System
Windows 11 x64, Bun 1.4.4.
Terminal
CLI subprocess with captured stdout; no TUI or third-party plugins.
- Dominant language
- TypeScript
- Stars
- 227k
- Forks
- 30.7k
- Avg merge
- 4h 35m
- Merged PRs (30d)
- 498
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
area/desktop platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
anomalyco/opencode#64566 · 1 comment ·
Maintainers usually reply within 1 day
-
Opening mini-tabsOpenarea/desktop platform/windows status/repro-plausible type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
anomalyco/opencode#64522 · 1 comment ·
Maintainers usually reply within 1 day
-
opencode-native panics on session ID after a multibyte characterPossibly taken A pull request linked to this issue is open or already merged. Openarea/tui platform/macos status/repro-plausible type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
anomalyco/opencode#64389 · 1 comment ·
Maintainers usually reply within 1 day
-
cli: plugin list shows - for ID of TUI-only plugins configured in cli.jsonPossibly taken @yash-alla claimed this 1 day ago. Openarea/cli platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#64175 · 1 comment ·
Maintainers usually reply within 1 day
-
area/desktop platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#64077 · 3 comments ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude Cosmetic
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Domain / chatbot New
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Inist-CNRS/lodex#3861 ·
Maintainers usually reply within 1 day
-
area:agent-sdk area:docs documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
anthropics/claude-code#110914 ·
-
approved check:passed streams:remove
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day