Skip to content

claude-code-headless composer live test leaves a trust entry and a transcript in the real ~/.claude #1329

Closed
Juliusolsson05/claude-code-headless
#68

Description

@Juliusolsson05

Split out of #1295 (that issue is about live tests copying credentials; this one copies nothing).

packages/claude-code-headless/test/live/composerDetection.live.test.ts (opt-in live tier) runs a real Claude turn with the developer's real login in place, in a mkdtemp cwd. It accepts the folder-trust dialog and sends a prompt, so it leaves behind in the REAL home:

  • a trust entry for …/T/composer-live-* in ~/.claude.json projects (two found on the owner's machine, 2026-09-26),
  • a session transcript under ~/.claude/projects/<sanitized composer-live cwd>/,
  • the temp cwd itself (never removed).

It cannot use a throwaway CLAUDE_CONFIG_DIR the way the ATP native-resume probe now does (agent-transcript-parser#37), because it needs an authenticated turn. Options: remove the projects dir and cwd after the PTY exits (cheap, partial), and accept the trust entry; or seed trust via a project-local mechanism if Claude has one. Editing the real ~/.claude.json from a test races running Claude sessions and should not be done.

Severity P3 (opt-in, no credential exposure). Found while fixing #1295.

🤖 Generated with Claude Code

Activity

  1. Juliusolsson05 commented on Sep 27, 2026

    @Juliusolsson05
    OwnerAuthor

    Fix: Juliusolsson05/claude-code-headless#68 (test-only in the package, so the app needs no pointer bump). Measured: two live runs leave no transcript dirs or cwds; trust entries 289 → 290 → 290 (one shared entry for the package's git dir, never a new temp path). It also fixes the canary's trust-dialog handling, which upstream drift had broken (the dialog now preselects "No, exit").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions