Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,15 @@ from `ui-token` on every API call, rejects requests whose `Host` is not
- Claude Code has no "closed" state for interactive sessions (they vanish once their
process ends) and leaves a finished background session as `done` after `claude stop`.
`closed.json` is what keeps both listed as closed.
- History is read from `<account>/projects/<folder>/<session>.jsonl`, top level only,
read-only. Artifacts are the links Claude Code records there when a conversation
publishes or opens one.
- History is read from `<account>/projects/<folder>/<session>.jsonl`, read-only.
Artifacts are the links Claude Code records there when a conversation publishes or
opens one. Sub-agents' conversations, under `<folder>/<session>/subagents/`, are not
listed as sessions of their own.
- Token counts come from the usage Claude Code records on each reply in those files. A
reply written over several lines is counted once. Sub-agents keep conversations of their
own, which are not counted, and days older than an account's `cleanupPeriodDays` are
empty because Claude Code has deleted them.
reply written over several lines is counted once (Claude Code's own `/stats` counts it
once per line, so its totals come out higher). A sub-agent's replies count with the
session that started it. Days older than an account's `cleanupPeriodDays` are empty
because Claude Code has deleted them.

### Codex

Expand Down
5 changes: 3 additions & 2 deletions ui/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,11 @@ function renderSessions() {
: h('span', { class: 'count' }, String(entries.length))),
entries.map((e) => entryRow(e, folderOf(e), hits.get(e.key))));
}),
(hiddenEmpty > 0 || shownEmpty > 0) && h('p', { class: 'list-more' },
// replaceChildren writes out a false as text, so nothing is an empty string here.
hiddenEmpty > 0 || shownEmpty > 0 ? h('p', { class: 'list-more' },
h('button', { type: 'button', class: 'btn-link', onclick: () => { state.showEmpty = !state.showEmpty; render(); } },
icon('eye'), state.showEmpty ? 'Hide empty conversations' : `Show ${plural(hiddenEmpty, 'empty conversation')}`),
h('span', { class: 'quiet' }, ' Opened and never used: no prompts.')),
h('span', { class: 'quiet' }, ' Opened and never used: no prompts.')) : '',
h('p', { class: 'quiet list-note' }, reading ? 'Reading saved conversations…'
: (activeAccounts().some((a) => a.tool === 'claude') ? `Claude Code itself deletes conversations after ${span} days without activity ` +
'(its cleanupPeriodDays setting, shown per account under Accounts). ' : '') +
Expand Down
2 changes: 1 addition & 1 deletion ui/concept.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ function usageView() {
h('div', { class: 'usage-row' }, hourMap(week), breakdown('By account', [...perAccount.entries()], (name) => accountColor(name))),
h('div', { class: 'usage-row' }, breakdown('By model', [...perModel.entries()]), topSessions(chosen)),
h('p', { class: 'usage-note' },
'Counted from each reply in the conversations Claude Code and Codex keep on this computer. Work done by sub-agents is in conversations of its own and is not counted here. ',
'Counted from each reply in the conversations Claude Code and Codex keep on this computer. Each reply counts once, however many lines it is written over, and a Claude Code sub-agent\'s replies count with the session that started it. ',
'Claude Code deletes conversations after their account\'s cleanupPeriodDays (30 days unless changed), so older days are empty. Codex keeps them until they are deleted.'));
}

Expand Down
Loading