Token usage, notes, and repository insights
Use Token Usage to review recorded AI activity, Notes for personal working documents, and LOC History or Treemap to explore a repository's size and changes. Every edition includes these features. Usage and quota figures depend on what each provider exposes.
Contents
- Token Usage
- Check account quota
- Notes
- Repository LOC History
- Tracked Files Treemap
- Usage dates and measurement reference
- Preserve or recover usage history
Token Usage
Open Token Usage to see usage from your configured CLI profiles. Its calendar shows token counts by recorded date. The repository table allocates the selected sources' accepted history to repositories.
- Configure your CLI launcher and profile in Launchers.
- Open Token Usage and let saved history load.
- Select the source profiles to include.
- Leave Token Usage automatic updates enabled in Settings → General settings… → Updates, or open the circular-arrow menu and choose Incremental update to update now.
- Select a day or range on the calendar to inspect its counts.
Token Usage automatic updates is on by default and remembers your choice. While Token Usage is visible, it updates selected, available sources after saved history loads and at the configured interval, 20 minutes by default. Change Token Usage update interval (minutes) in the same Updates section. Automatic updates are incremental: they check new or changed local history, including additions to existing conversations. Turning the setting off leaves updates to you; a scan already running can finish.
Not scanned means the profile has not yet been counted. Loading, Queued, and Not loaded are progress states, rather than zero usage. The bundled OpenCode integration does not supply Token Usage figures.
Select accounts and dates
Right-click a source row and choose Edit launcher to open that source's saved launcher settings.
Click a source row to include or exclude it. This selection controls the calendar, combined total, repository table, and profiles scanned by the main update button. A single source is always included; with several sources, keep at least one selected.
The calendar covers the most recent 365 days, including today. Click a square for one day or drag across squares for an inclusive range. Press Escape while the calendar has focus, or click unused calendar/page background, to return to the full year.
Source-row totals and the calendar follow the selected dates. They include accepted counts on their recorded dates, including cumulative conversation totals and counts with approximate timestamps. The repository table covers accepted history independently of the selected dates.
Read totals
Token Usage counts local CLI history on this workstation, including readable history from use outside Logonomic. It does not cover all activity under the same login on other devices or services. A source profile identifies the history being read; changing that profile's signed-in account does not reassign its older usage to the new account.
The calendar uses the recorded date of each accepted count. A record can be a cumulative conversation total rather than an increment measured on that day, so the chart does not establish exactly when every token was consumed. An unavailable figure is not verified zero. Token counts are not an invoice or a remaining subscription allowance.
Two profiles can contain the same history. Each source row retains its profile's total, while combined figures remove duplicates where there is sufficient evidence. For example, profiles containing 1,000 tokens and the same 1,000 plus 300 can retain source totals of 1,000 and 1,300, with a combined total of 1,300. Hover a duplicate indicator to see each source's contribution.
Estimated or a ~ prefix means some selected information is incomplete or duplicate removal is uncertain. Hover for the reason. A calendar record count refers to contributing usage records, not terminal sessions. Use the Sessions panel for terminal/session history.
Read Usage date reference for the scope of each total before comparing it with another view.
Repository usage table
The table allocates the selected sources' accepted accounting history to repositories, independently of the calendar's dates. Click a column heading to sort by repository, provider, or Displayed total; click again to reverse the order. Hover a name for its checkout path. Linked worktrees may appear beneath their main checkout, with each row retaining its own usage.
Unattributed includes tokens that could not be safely assigned to a repository. Other repositories combines smaller entries when the table is very large. Both contribute to the displayed total.
Wait for Loading or Updating to finish before using the table. If repository detail is unavailable or inconsistent, read its message and the source statuses rather than treating the missing allocation as zero activity.
Recount, stop, repair, and reset
The circular-arrow button opens the update menu. Choose Incremental update for selected sources, or Full update to reread all available local CLI history. The confirmation explains that a full update may replace previously saved usage results and does not create a restore point. Use incremental updates for ordinary refreshes; preserve a backup before a full update if you need to keep the current figures. Right-click a source row and choose Recount source history to update that source alone.
Choose Stop to cancel an active scan and turn Token Usage automatic updates off, then wait for Stopping scan… to finish. Previously accepted results remain when a scan is stopped before completion; Stop cannot undo a result already accepted. To resume automatic updates, enable Token Usage automatic updates again in Settings → General settings… → Updates.
A failure banner names the source and offers an appropriate action:
| Action | Use |
|---|---|
| Retry | Scan again after fixing a read or provider problem. |
| Reload | Retry loading saved usage detail. |
| Repair & Retry | Repair the provider's usage cache and rescan. |
| Edit Launcher | Correct the identified launcher/profile configuration. |
| Dismiss | Hide the notice. |
| Clear & Rescan… | Preserve the profile's accepted history, then rebuild this source from readable CLI history. |
Use an ordinary recount or the offered repair first when you only need updated figures. Clear & Rescan… opens Clear saved source history? Choose Not now to leave history unchanged, or Clear & Rescan to rebuild only that source. Other sources keep their accepted figures. Deleted or unreadable CLI history cannot be reconstructed; rebuilding can reduce the selected source's totals.
Before rebuilding, Logonomic preserves the whole profile's accepted detailed usage history. Readable history becomes a verified Before Clear & Rescan copy in Saved usage history. Damaged originals are retained separately for investigation. If preservation fails, the rebuild stops and accepted history is kept; read the diagnostic before trying again.
The calendar's context menu also offers Full Reset, which rebuilds detailed usage for all configured sources, including those outside the current selection. Only CLI history that still exists and can be read can be reconstructed.
Full Reset opens Rebuild all usage history? Choose Not now to leave history unchanged, or Save copy & rebuild to continue. Logonomic saves a recovery copy of readable accepted history before replacing it; if the copy cannot be saved, the reset stops. Unreadable originals are retained separately for recovery. CLI files stay unchanged.
Let loading or another scan finish before starting a conflicting operation. If a failure says Current totals were kept, or shows Previously saved / delayed updates, the visible saved figures do not establish that the latest scan succeeded. A persistent storage error calls for recovery from a verified snapshot or support-directed repair.
Check account quota
Quota indicators show the provider's remaining allowance and reset windows. Token Usage shows recorded consumption from local history. Different time periods, other devices, and provider-specific weighting can make the two disagree.
Hover an account indicator for window names, reset times, freshness, and errors. When available, Updated gives the absolute timestamp for the figures shown. Status updated labels the timestamp of an observation without quota figures. A failed refresh can leave an older reading visible with its original timestamp. N/A means unavailable.
Open the account logo's menu for Refresh now, Check sign-in status, refresh settings, and Edit launcher for the saved launcher represented by that entry. Automatic refresh checks at startup and at the configured interval (five minutes by default); Manual refresh leaves updates to you. Several launchers can share a quota indicator when they use the same provider login, while their usage profiles remain separate. See Launchers, accounts, and add-ons for provider setup and account controls.
Change the automatic interval under Settings → General settings… → Updates → Quota refresh interval (minutes). Quota refresh and Token Usage updates have separate controls and schedules.
Notes
Notes are working text documents saved in the Logonomic profile. They can stand alone or be linked to a conversation, and remain available across repository changes and ended sessions. Notes created for a Session retain their conversation association independently of their title and working directory.
Create and organize a note
- Open Notes in the side panel.
- Click Create note (the plus button).
- Type in the new note's editor. Notes autosave about two seconds after the last edit; Ctrl+S saves explicitly.
Click a title to reopen a note. Filter notes searches titles without regard to case; Escape clears it. Sort by name or by date. Date order uses creation time, so editing a note does not move it to the top.
Notes for a conversation
Open Notes in a terminal's header to see that conversation's notes. Choose + add note to create one, or select a title to reopen it. A new note starts empty and takes the conversation's current title, or an automatic Note N name if no usable title is available. Later conversation-title changes leave the note's title unchanged. Use Note actions → Rename in the main Notes panel to rename it independently.
These notes also appear in the main Notes panel with their recorded worktree. Their association follows the same provider conversation when it is resumed in another terminal. Use Note actions → Show original session when the linked session is available. To resume a remembered conversation, use Resume in Sessions. Removing or forgetting the session's history leaves its notes available, although the conversation may no longer be available to resume from them.
A managed agent can create, list, read, edit, and rename notes through the Session Notes commands. Agent edits use the same document as an open editor, including its unsaved text, and follow normal undo, autosave, and conflict handling.
Return to a Note's conversation
A small terminal icon at the front of a Note's document tab marks a stored conversation association. The icon is bright blue while that session is running and subdued otherwise. An ordinary document or independent Note has no association icon.
Hover over an inactive icon for its session-status tooltip. Running icons have no tooltip. Click a running session's icon to bring its exact terminal forward and pulse its header, including when it is covered by another tab, in another repository, or in a detached window. Click an inactive session's icon to reveal and pulse its corresponding card in Sessions. Keyboard activation performs the same action.
Select a note in a session header's Notes menu to bring its document tab forward and pulse its title. An already open note keeps its existing tab.
The association follows the original conversation when it resumes elsewhere; starting a different conversation in the original terminal does not move the Note to that successor. Restored views of the Note retain the association. Using Save As for an open Note leaves the original managed Note associated and removes the badge from the departed view.
Rename, export, and delete
Use a row's Note actions → Rename action to edit its title, then Save name or Cancel rename. Escape cancels. An empty or whitespace-only name keeps the previous title.
Note actions → Export writes the note's current text to a separate file at the path you choose. An open note exports its editor text, including unsaved edits, even when saving the original fails. Exporting leaves the original note's unsaved state and save error unchanged. Choose a destination outside managed note storage. To share through Git, export into a repository and commit the copy with your normal workflow. Later note edits do not update that export.
Choose Note actions → Delete to close the note's editors and preserve the saved text and distinct unsaved drafts. Deleted notes survive application restarts and stay there until you restore or permanently delete them. Nonempty notes stay in the ordinary Notes list when their tabs close.
Auto-remove empty notes in Settings → General settings is enabled by default. Closing the last tab moves an empty note to Deleted notes only when it has no Undo or Redo history. On exit, Logonomic moves all empty notes there, including notes with closed tabs. Empty means zero characters; whitespace is kept. Turning this setting off keeps notes in the ordinary list when their tabs close or Logonomic exits.
To recover one, choose Deleted notes, find the note, and select Note actions → Restore. The restored note opens. Saved text and distinct drafts can return as separate notes. If the original file still exists, it also returns as an (original file) note, keeping changes from other editors separate from the restored copies. Check their titles and contents before removing a copy you no longer need.
To erase a deleted note, select Note actions → Permanently delete, check the note title in the confirmation, then choose Cancel or Delete permanently. Permanent deletion removes all preserved versions and cannot be undone.
To empty the entire Deleted notes collection, select Clean up beside its explanation and confirm. This includes all preserved versions and notes hidden by the current filter. Notes that cannot be removed remain in Deleted notes; resolve the reported storage or open-view issue before trying again.
Saving, external changes, and storage problems
Closing a note normally attempts to save pending work. A failed save leaves it open with the error; correct the cause and press Ctrl+S to retry. Reloading unsaved text offers Save, Discard, or Cancel, as described in Reloading a modified document.
For editor search, shortcuts, and external-change handling, see Git, files, and diffs.
For backup, close Logonomic and copy the whole notes directory from the profile's persistent data. This preserves bodies, titles, the note list, and any Deleted notes. See Settings and reference for profile locations.
If deletion or restoration reports a storage error, keep the note and its files intact while you resolve the error. Check the active profile and file permissions. Preserve the entire notes directory before manual repair or restoring a complete backup; do not remove leftover bodies or drafts merely to clear an error. Include the message when contacting support.
Repository LOC History
Use LOC History to see how a repository's committed text size changed over time.
- Select a repository and open LOC History.
- Let its saved history load or its first index finish.
- Choose Directory or Language under MODE.
- Choose All, 1y, 6m, or 3m under RANGE.
- In Directory mode, expand the areas you want to explore and select the series to show. Hover the plot for date, line count, and commit.
The view follows repository selection while visible. Use Rebuild LOC history cache after new commits or branch changes when you want a fresh measurement. If indexing fails, fix the reported Git or repository problem and click Retry. Only one index job runs at a time. For No data in range, try All first; shorter ranges are measured back from today.
What “LOC” means here
LOC is the count of nonblank physical lines, including comments and other text in recognized file families. History measures complete committed trees along HEAD's first-parent chain. A merge point measures the merged tree without separately plotting every side-branch commit. Uncommitted edits are outside this view.
Only files in the recognized file families below contribute to the total. Binary files, symbolic links, and nested submodule contents are excluded. Committed generated and vendor files count when their extensions are recognized.
Read and navigate the plot
Directory mode follows the directory hierarchy. Use a row's disclosure arrow
to expand or collapse its children, and its checkbox to include or exclude
that part of the repository. A partially checked directory has a mixture of
included and excluded descendants. Expand Other to inspect smaller groups
and files counted directly in their parent directory. Expand successive levels
to follow a path such as src/widgets/private. Files counts files directly
inside a directory, and . counts root files. Language mode groups the same
counted files by family.
The filled plot is stacked. Its top edge is the sum of visible series; each band's thickness is that group's count. The series list shows the latest count in the chosen range. Hover the plot to inspect an earlier sample and its commit. Dates are displayed in the workstation's time zone; the sample card includes the UTC offset.
Drag to pan through time and use the wheel to zoom around the pointer. Click the active range again to reset its horizontal view. For vertical or combined navigation, see Plot gestures.
Tracked Files Treemap
Use Treemap to find large tracked files or see where local changes are concentrated.
- Select a repository and open Tracked Files Treemap, or its repository-details Treemap action.
- Choose Sizes for current file bytes or LOCs for nonblank text lines.
- Hover a rectangle for its path and measurements; click to keep it selected.
- Double-click a directory to focus it, or a file to open it.
Larger rectangles mean larger values. Directory regions contain their descendants. Double-click the focused directory's header to go up one level; Escape clears file selection.
The map includes tracked files in the current working tree. It excludes untracked files and does not measure the total disk use of .git or deleted history. Small and zero-value files may be difficult to see; use Worktree for a complete filename list.
Diffs: area and change intensity are separate
Enable Diffs to color files by added plus removed lines relative to HEAD, including staged and unstaged edits. Replacing ten lines with ten new ones gives 20 changed lines. Rectangle area still follows the selected Sizes or LOCs measure; stronger color marks more change relative to other files in this map.
With Diffs off, double-clicking a file opens it. With Diffs on, double-clicking a changed file opens its diff against HEAD; a file without changes opens as it does with Diffs off. Before a repository's first commit, Diffs colors changes against an empty base, but a file's diff cannot open: double-clicking reports Repository HEAD is unavailable. Use a folder diff until the first commit exists.
Unchanged files appear neutral gray. If Git cannot supply changes, the tooltip explains that failure. Use a folder diff to account for untracked, deleted, binary, and other changes that this map cannot fully represent.
Refresh and unavailable measurements
Click Refresh tracked files from Git for a current view. Repository changes can also trigger updates. While updating, or after a failed refresh, the panel can retain the old map with a status message; check that message before treating it as current.
An unavailable measurement is not zero. A directory marked >= … incomplete shows a known lower bound because some files could not be measured. Binary files can have a valid byte size while their line count is unavailable; LOC counting is limited to text up to 2 MiB.
If a file is missing or will not open, refresh and select it again, then check Worktree to confirm that it still exists and is tracked.
Usage dates and measurement reference
Usage date reference
The stored date and the view's scope determine what a figure includes:
| Figure | Meaning |
|---|---|
| Calendar and source-row totals | Accepted counts whose recorded dates fall within the selected day or range. |
| Combined total | Selected sources' counts for that range, with duplicate history removed where the records support it. |
| Repository table | Selected sources' accepted accounting history, independently of the calendar's selected range. |
| Companion's Last 14 days | Accepted desktop history grouped by recorded date within that period. |
Recorded dates can come from cumulative conversation records or approximate timestamps. A count displayed on one day does not prove that all its tokens were consumed on that day. Updating history can revise a count or its recorded date as the provider supplies more information. Compare like scopes and check source status before interpreting a difference as new consumption.
Source date conventions are retained. Dates from different sources are not normalized to one timezone, and Companion uses the same stored record dates as the desktop.
The repository table retains at most 512 named/grouped rows, plus Unattributed. When grouping is needed, up to 511 individual repositories remain alongside Other repositories. Sorting does not change which smaller entries are grouped.
LOC History file families
| Family | Filenames/extensions |
|---|---|
| CMake | CMakeLists.txt, .cmake |
| C++ | .c, .cc, .cpp, .cxx, .h, .hh, .hpp, .hxx |
| QML | .qml |
| JavaScript | .js, .jsx, .mjs, .cjs |
| TypeScript / Qt translations | .ts, .tsx, .mts, .cts |
| Go | .go |
| Rust | .rs |
| Java | .java |
| Scripts | .ps1, .bat, .cmd, .sh, .py |
| Docs | .md, .rst, .txt |
| Config | .json, .yaml, .yml, .xml, .qrc, .rc |
Recognition ignores case. TypeScript and Qt translation files share the .ts extension, so their lines appear in the combined TypeScript / Qt translations family.
Treemap LOCs can count other readable text extensions and measure current working files, while LOC History uses this list and committed trees. Their totals can therefore differ.
Plot gestures
| Gesture in LOC History | Effect |
|---|---|
| Left-button drag | Pan through time. |
| Mouse wheel | Zoom time around the pointer. |
| Alt + drag / wheel | Pan / zoom vertically. |
| Ctrl + drag / wheel | Pan / zoom both axes. |
| Supported two-finger pinch | Zoom time around the gesture center. |
| Click the active range | Reset the horizontal view to that range. |
Preserve or recover usage history
Restore saved usage in the current profile
Use Saved usage history… in the Token Usage calendar's context menu to restore a recovery copy in the current profile in every edition:
- Finish or stop any active usage scan, then open Saved usage history….
- Select a copy by its local date, source names, size, and Before Clear & Rescan, Before Full Reset, or Before restore label.
- Read Restore saved usage history?. Restoration replaces detailed chart, source, and repository usage for all sources in this profile.
- Choose Not now, or Save copy & restore to preserve the current readable history and restore the selected copy.
Restoration does not need the original CLI history files. It leaves launcher settings unchanged. If the saved source settings no longer match, restoration is refused and current history is kept; read the error before changing profiles or launcher settings.
Recovery copies remain available after restarting Logonomic and do not expire automatically. The dialog displays their storage location. They remain part of this local profile, so keep an external backup for protection against losing the profile or its disk. If no copy is listed, use an external backup; a recount cannot reconstruct deleted CLI history.
Damaged originals retained during reset are separate from verified saved copies. Keep them for investigation; see Usage storage problems.
Remove saved usage copies
Open Saved usage history…, select the copy by its date, sources and size, then choose Delete saved copy… in the restore dialog. Check the selected copy in Delete this saved usage copy? and choose Not now or Delete saved copy. Deletion is permanent; keep an external backup first if you may need that copy again.
The list refreshes after deletion. Current usage, other saved copies, separately retained damaged originals and external backups stay unchanged. Let an active usage operation finish before deleting a copy. If deletion fails, read the diagnostic; a partly removed copy may no longer be restorable.
Make or restore an external backup
For a normal backup, preserve the entire Logonomic profile while the application is closed; see Settings and reference. Keep original CLI history separately if you need it for future recounts. Closing Token Usage does not delete its saved history.
For a targeted backup, the shipped logonomic_token_usage_recovery exports launcher configuration and accepted token history. It excludes CLI history directories and credentials, notes, repository files, and session history. Use the copy shipped with Logonomic, close the application, and substitute your paths:
& 'C:\path\to\logonomic_token_usage_recovery.exe' --recovery-export `
--launchers 'C:\path\to\profile\config\llm_cli_launchers.json' `
--destination 'D:\Backups\logonomic-usage-2026-10-30'
& 'C:\path\to\logonomic_token_usage_recovery.exe' --recovery-verify `
--source 'D:\Backups\logonomic-usage-2026-10-30'
The destination must be an absolute, nonexistent directory with an existing parent. The tool reads the launcher configuration to find the active usage storage, including history selected by a previous restore, and preserves the accepted usage records. Success prints Token usage recovery operation verified successfully. A failed export is not a verified backup; if the source changed during export, close its owner and retry with a new destination.
On Windows and Linux, restore into a fresh profile directory with:
& 'C:\path\to\logonomic_token_usage_recovery.exe' --recovery-restore `
--source 'D:\Backups\logonomic-usage-2026-10-30' `
--destination 'D:\Logonomic-restored-usage'
The same destination rules apply, and restoration refuses to overwrite an
existing profile. Select the restored profile with --user-data-dir. Close
Logonomic and its surviving runtime owners before restoring. Historical figures
remain available in the restored profile. Provider installations and sign-in
are managed separately.
Usage storage problems
If a reset or restore reports a preservation error, keep the diagnostic and resolve the storage or permission problem before retrying. Use a verified copy from Saved usage history… to restore accepted figures.
Unreadable originals retained during reset occupy
<launcher-storage-directory>/token_usage.reset-recovery-<UUID>/, beside active
token_usage. With --user-data-dir, this is
<user-data-dir>/config/token_usage.reset-recovery-<UUID>/. These folders hold
raw evidence for investigation and are separate from verified restore points.
A failed raw copy can leave an incomplete folder; its existence does not
establish a successful backup. Leave these folders intact when asking support
to investigate damaged history.