You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/USER-GUIDE.md
+68-5Lines changed: 68 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# AgentDeck User Guide
2
2
3
-
> **Version**: 4.7.0
3
+
> **Version**: 4.8.0
4
4
5
5
AgentDeck is a desktop command center for managing AI coding agents through WSL2 terminals. This guide covers every feature from first launch to advanced workflow automation.
6
6
@@ -21,10 +21,12 @@ AgentDeck is a desktop command center for managing AI coding agents through WSL2
@@ -541,6 +543,67 @@ In the Themes sub-menu, arrow keys give a live preview of each theme. Press Ente
541
543
542
544
---
543
545
546
+
## Cost/Token Tracking
547
+
548
+
AgentDeck tracks token usage and estimated cost for **Claude Code** and **Codex CLI** sessions in real-time.
549
+
550
+
### How It Works
551
+
552
+
When a session starts, AgentDeck discovers the agent's JSONL log file in WSL and tails it every 3 seconds. Token usage and cost are parsed from the log entries and pushed to the UI.
553
+
554
+
-**Claude Code**: Reads `~/.claude/projects/` session logs. Pricing uses the model ID (opus/sonnet/haiku) with cache-aware rates — cache writes cost 1.25x, cache reads cost 0.1x of the base input rate.
**Hover** the badge for a tooltip breakdown: input, output, cache read, and cache write tokens.
564
+
565
+
The cost and token count are always consistent — both reflect the same set of tokens, so the numbers make sense together.
566
+
567
+
### Notes
568
+
569
+
- Cost tracking is automatic — no configuration needed
570
+
- Only Claude Code and Codex are supported (other agents show no badge)
571
+
- On the first turn, Claude shows high token counts due to system prompt caching — this drops dramatically on subsequent turns
572
+
- Cost data is per-session and resets when the session closes
573
+
574
+
---
575
+
576
+
## Git Worktree Isolation
577
+
578
+
Each agent session can run in its own **git worktree** — an isolated copy of the repository on a separate branch. This prevents agents from interfering with each other or with your working directory.
579
+
580
+
### How It Works
581
+
582
+
When you open a session for a project that is a git repository, AgentDeck automatically creates a worktree:
583
+
- A new branch is created (e.g. `agentdeck/session-abc`)
584
+
- The agent works in the worktree directory, not your main working copy
585
+
- Changes are isolated until you decide to keep or discard them
586
+
587
+
### Branch Badge
588
+
589
+
When a session has an isolated worktree, a **branch badge** appears in the pane topbar showing the branch name. The status bar also shows a worktree indicator.
590
+
591
+
### Closing a Session
592
+
593
+
When you close a session with an active worktree, AgentDeck inspects the worktree for changes:
594
+
595
+
-**No changes**: Worktree is silently cleaned up
596
+
-**Has changes**: A dialog appears with three options:
597
+
-**Keep** — Preserve the branch and worktree for later merging
598
+
-**Discard** — Delete the worktree and branch (changes are lost)
599
+
-**Cancel** — Keep the session open
600
+
601
+
### Cleanup
602
+
603
+
Orphaned worktrees (from crashes or abrupt exits) are automatically pruned on startup.
604
+
605
+
---
606
+
544
607
## Agent Updates
545
608
546
609
AgentDeck checks for agent updates on startup and shows a toast notification when updates are available.
0 commit comments