Pre-flight checks
Which OpenCode do you use?
OpenCode 1 (opencode-quota 4.x)
OpenCode version tested
1.18.34
opencode-quota version tested
4.10.1
Bug summary
Token totals (token_total, token_daily, token_weekly, etc.) sum all forks into the total, which is clearly incorrect in terms of actual consumption.
Steps to reproduce
- Create a session and start the conversation to incur consumption costs.
- Fork the session, but do not continue the conversation to incur further consumption costs.
- Check the totals, which will now sum both the main session and the fork, providing an inflated total cost.
Expected behavior
Forked session responses should be filtered if they are part of another session.
Actual behavior
The tokens are summed for every fork of a session. Concrete example:
A session has a cost of $10, and my total is correctly reported as $10.
I fork the session but do not use it further, yet my totals are now incorrectly reported as $20.
Relevant logs/output
If not tested on current production OpenCode, explain why
No response
Pre-flight checks
Which OpenCode do you use?
OpenCode 1 (opencode-quota 4.x)
OpenCode version tested
1.18.34
opencode-quota version tested
4.10.1
Bug summary
Token totals (token_total, token_daily, token_weekly, etc.) sum all forks into the total, which is clearly incorrect in terms of actual consumption.
Steps to reproduce
Expected behavior
Forked session responses should be filtered if they are part of another session.
Actual behavior
The tokens are summed for every fork of a session. Concrete example:
A session has a cost of $10, and my total is correctly reported as $10.
I fork the session but do not use it further, yet my totals are now incorrectly reported as $20.
Relevant logs/output
If not tested on current production OpenCode, explain why
No response