anthropics / anthropics/claude-code

Desktop app context-window breakdown shows 90% free while header shows 60% used

オープン
#94,436 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:desktop area:ui bug platform:windows
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

## Summary
In the Claude Code desktop app (Code tab, Windows), the **Context window** popover header shows the correct total, but the per-category breakdown below it does not add up and reports ~90% free space for a session that is actually 60% full.

## What I saw
Header: `598.5k / 1M (60%)`

Breakdown rows in the same popover:

| Row | Tokens | % |
|---|---|---|
| System tools | 18.6k | 1.9% |
| Memory files | 14.7k | 1.5% |
| Messages | 13.4k | 1.3% |
| System prompt | 10.8k | 1.1% |
| Skills | 4.3k | 0.4% |
| Custom agents | 529 | 0.1% |
| Autocompact buffer | 33k | 3.3% |
| **Free space** | **904.6k** | **90.5%** |

The rows sum to ~95k, so "Free space" is computed as 1M minus ~95k, ignoring ~500k of real context.

## Verification
I read the session's transcript JSONL. The last assistant message's `usage` was:

```
input_tokens=32 cache_creation_input_tokens=644 cache_read_input_tokens=597573
```

That is 598,249 tokens, matching the header. The session had 174 assistant turns over ~1h12m with many tool results (file reads, command output, subagent reports). "Messages 13.4k" appears to count only message text and omits tool results, which are the bulk of the context.

## Expected
The category rows and "Free space" should reconcile with the header total (i.e. tool results/conversation content should be attributed, and free space should be ~400k / 40%).

## Environment
- Claude Code 2.1.272, desktop app (Code tab)
- Windows 11 Home 10.0.26200
- Model: Fable 5.1, effort High, bypass permissions
- Session running in a git worktree, launched by a scripted chain (`claude` non-interactive launch, then viewed in the desktop app)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。