Track Your Session Cost with /cost
Token costs can creep up during a long session, especially when Claude is reading large files or looping through complex tasks. The /cost command gives you an instant snapshot.
Just type it mid-conversation:
/cost
You'll get a breakdown of input tokens, output tokens, and the estimated cost for everything since the session started — useful for keeping an eye on burn rate during a long refactor or an automated pipeline run.
This pairs well with /compact — if you notice the cost climbing and the context is bloated with earlier context you no longer need, run /compact to summarise and reset, then check /cost again to see the difference.
/compact
/cost
If you're running Claude in CI or scripted pipelines with --output-format stream-json, the cost data is also emitted in the final JSON event under usage, so you can log it programmatically:
claude -p "your task" --output-format stream-json | \
jq 'select(.type == "result") | .usage'
Run /cost whenever you're curious — it takes one second and keeps surprises off your bill.
Log in to leave a comment.
When typing feels slow — describing a complex bug, explaining architecture, or thinking through a problem out loud — press Option+V to switch to voice input. Speak naturally and Claude Code transcribes your words into a prompt, so you can describe what you need at the speed of thought.
When Claude is heading down the wrong path — editing the wrong file, writing code you don't want, or giving a long explanation you don't need — press Escape to stop it immediately. You keep everything it did up to that point and can redirect with a new prompt.
Closed a session and realized you weren't done? Pass --continue (or -c) when launching Claude Code to pick up exactly where you left off — same context, same files, same conversation history — without re-explaining what you were working on.