Skip to content

Claude CLI usage probe mints a new empty account session per probe, polluting the claude.ai session list (dozens of <host>-<word>-<word> entries) #2251

Description

@elpinguinofrio

Summary

CodexBar's Claude CLI usage probe (ClaudeCLISession, working dir ~/Library/Application Support/CodexBar/ClaudeProbe) launches a fresh headless claude CLI session on every probe. Each launch registers a new, permanently-empty session on the user's Anthropic account. Over weeks this pollutes the claude.ai / Claude desktop session list with dozens of entries auto-named <hostname>-<adjective>-<noun> (e.g. macosvm-snug-moore, macosvm-typed-lovelace, macosvm-eager-conway) — 36+ on my account so far, accumulating at roughly one per day since the ClaudeProbe workdir was created (Jun 7).

The user has no way to tell these come from CodexBar — they look like a rogue agent spawning sessions, which is how I initially investigated it.

Environment

  • CodexBar 0.43.0 (104), installed in /Applications, launched as Login Item
  • Claude Code CLI 2.1.212, ~/.local/bin/claude
  • macOS 15.7.3 (arm64), hostname macOSvm
  • Claude source: auto (OAuth path failing → CLI fallback active; claudeOAuthDelegatedRefreshLastAttemptAtV1 = Jul 8)

Evidence

  • ~/.claude/projects/-Users-elpinguino-Library-Application-Support-CodexBar-ClaudeProbe/ is created when the probe runs — but contains zero transcripts (probes send no messages), so every probe leaves a nameless server-side session.
  • Cross-referencing ~/.claude/session-env/ (one entry per locally-started session) against ~/.claude/projects/ transcripts: 11 transcript-less "phantom" sessions Jul 8–17, ~1/day, the last at 10:50 today.
  • Prefs contain claudeCLIUsageRateLimitBlockedUntilV1 — the probe even got rate-limited by Anthropic today, so the probe frequency is also hitting API limits.
  • All words in the generated session names match the adjective/noun word lists embedded in the claude CLI binary (30/30 from my session list screenshot), confirming these are CLI-minted untitled sessions, not another device.

Expected

Usage probing should not create durable account-side sessions, or at minimum should reuse one persistent session. Options that would fix it:

  1. Reuse a single session (--resume/fixed --session-id) for all probes instead of minting a new one each time.
  2. If the CLI/API gains a way to mark a session ephemeral/unlisted, use it.
  3. Document the behavior and surface it in the UI ("Claude CLI probing creates sessions named -…") so users don't chase ghosts.

Actual

Every CLI probe = one new permanent <host>-<random>-<random> session in the account list; no cleanup, no attribution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:ux-frictionUser-facing flow adds avoidable confusion or support burden without fully blocking progress.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions