Repository navigation
Skill API reference: a session's spend and usage are totals, its elapsed is the latest task's - #4
Open
eric-epsilla wants to merge 2 commits into
Open
eric-epsilla wants to merge 2 commits into
eric-epsilla wants to merge 2 commits into
Conversation
…sed is the latest task's The session list and the session read show spend_usd and elapsed side by side, and they count different spans: spend_usd and usage add up every task in the session, elapsed is the latest task's alone. A team reconciling its own records found the difference by hand. One paragraph says so, and where each task's own time is (the turn's elapsed in /turns). tests/test_cloud_scope.py checks it stays; it fails on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
@richard-epsilla, a one-paragraph doc fix. Problem. Session Approach. Document the difference rather than add a What I'd like from you:
|
The service now leaves spend_usd out for a session nothing was metered for, rather than writing 0, and keeps 0 for a known figure: nothing charged here (the organization's own key, a model listed free). A reader who shows a missing figure as $0 brings the old confusion back, so the reference says to show "—" for it and what a 0 means. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Added one paragraph in a second commit, under the same heading. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
GET /v1/sessionsandGET /v1/sessions/{id}showspend_usdandelapsedside by side, but they count different spans.spend_usd(andusage) add up every task in the session;elapsedis the latest task's alone. Nothing in the Skill says so. A builder who divides one by the other, or reconciles costs against time, gets wrong numbers.Change
references/api-reference.md, underGET /v1/sessions/{session_id}: one paragraph. It says which fields are session totals and which is the latest task's, and points to each turn's ownelapsedin/turns(sum those for the session's time).tests/test_cloud_scope.py: checks the paragraph stays. It fails on main.Verification
python3 -m unittest discover -s tests -p 'test_*.py': 45 tests, OK (1 skipped).🤖 Generated with Claude Code