Skip to content

Tokens, Cost, Duration don't seem to match up #16

@shadeydev

Description

@shadeydev

Claude Code v2.1.15
OpenSync version via commit ad62947
claude-code-sync version is 0.1.14.

Running OpenSync from local env. Forked then
npx convex dev
npm run dev
Auth with WORKOS_CLIENT_ID

claude-code-sync login
claude-code-sync setup

New folder, run claude. Prompt this is a test
With system prompt and tools that comes to 19365 tokens from Claude Code.
Type /config enable Verbose output. The 19365 is not high even thought it may appear to be.
Type /context

     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀   claude-opus-4-5-20251101 · 19k/200k tokens (10%)
     ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Estimated usage by category
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 3.0k tokens (1.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.9k tokens (8.4%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 456 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Messages: 420 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝   ⛶ Free space: 134k (67.1%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛝ Autocompact buffer: 45.0k tokens (22.5%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝

     Custom agents · /agents

     User
     └ worktree-sync-reset: 456 tokens

Note I ran /config twice and /context once. See Round 1 below.

Round 1 OpenSync:

In Opensync for this specific Project:

Project Prompt Completion Total Cost
test987 38.7K 0.0K 38.7K $0.7265

Full output of new session in new directory:

Round 1 Claude Code

  ⎿  SessionStart:startup hook succeeded

❯ this is a test

∴ Thinking…

  The user has sent "this is a test". This appears to be a simple test message to check if I'm working. I
  should respond briefly and appropriately.

⏺ Got it. I'm here and ready to help with any software engineering tasks you have. What would you like to
  work on?

❯ /config
  ⎿  Set verbose to false

❯ /config
  ⎿  Set verbose to true

❯ /context
  ⎿   Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀   claude-opus-4-5-20251101 · 19k/200k tokens (10%)
     ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Estimated usage by category
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 3.0k tokens (1.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.9k tokens (8.4%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 456 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Messages: 420 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝   ⛶ Free space: 134k (67.1%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛝ Autocompact buffer: 45.0k tokens (22.5%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝

     Custom agents · /agents

     User
     └ worktree-sync-reset: 456 tokens Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀   claude-opus-4-5-20251101 · 19k/200k tokens (10%)
     ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   Estimated usage by category
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 3.0k tokens (1.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.9k tokens (8.4%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 456 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Messages: 420 tokens (0.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛝ ⛝ ⛝   ⛶ Free space: 134k (67.1%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝   ⛝ Autocompact buffer: 45.0k tokens (22.5%)
     ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝ ⛝

     Custom agents · /agents

     User
     └ worktree-sync-reset: 456 tokens


─────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ~/Projects/test987 (Opus 4.5)                                                                19365 tokens

Round 2 OpenSync

Project Prompt Completion Total Cost
test99 38.7K 0.0K 38.7K $0.2382

Round 2 Claude Code

➜  ~ cd ~/Projects
➜  Projects mkdir test99
➜  Projects cd test99
➜  test99 claude

╭─── Claude Code v2.1.15 ──────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                     │ Tips for getting started                                       │
│                 Welcome back John!                  │ Ask Claude to create a new app or clone a repository           │
│                                                     │                                                                │
│                                                     │ ────────────────────────────────────────────────────           │
│                       ▐▛███▜▌                       │ Recent activity                                                │
│                      ▝▜█████▛▘                      │ No recent activity                                             │
│                        ▘▘ ▝▝                        │                                                                │
│ Opus 4.5 · Claude Max ·                             │                                                                │
│ wtmt7xxxxxxxxxxxxxxxxxxx@xxd.com's Organization  │                                                                │
│                 ~/Projects/test99                   │                                                                │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
  ⎿  SessionStart:startup hook succeeded

❯ this is a test

∴ Thinking…

  The user said "this is a test". This seems like a simple greeting or test message to see if I'm working. I should
  respond briefly and offer to help with whatever they need.

⏺ Got it. I'm here and ready to help. What would you like to work on?

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ help me build something                                                                                        ↵ send
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ~/Projects/test99 (Opus 4.5)                                                                            19370 tokens

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions