[Bug]: One submitted prompt spawned a second, invisible agent session on a different model, which ran gh write commands unsupervised #5447
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Scope — what is and isn't this report#
The bug being reported is only the session dispatch/visibility behavior:
- One submitted prompt created two agent sessions.
- The second session was invisible in the UI — no thread, no permission surface — while holding the same credentials/tool access as the visible one.
- The second session ran a different model at different effort (
claude-haiku-4-5, no thinking) than the thread's configuration (claude-fable-5, effort high).
What the duplicate then did with that access (it made poor triage decisions and closed issues in my repo) is not a T3 problem — that's just the model doing a mediocre job of a repo-specific workflow, and it's only mentioned because external side effects are how an invisible session gets noticed at all. Please read every mention of issue-closing below as "evidence the hidden session ran and wrote", not as a complaint about agent output quality.
Steps to reproduce#
Observed once; I don't have a deterministic repro yet, but full forensics are below so hopefully the dispatch path can be audited.
- Windows desktop app (Alpha 0.0.31), provider Claude Code, thread model
claude-fable-5at effort high. - Submit a single prompt in one thread (mine asked the agent to audit/triage GitHub issues in a repo of mine, using
gh). - One visible thread starts as expected — but a second Claude session is spawned the same second, invisible in the UI.
Expected behavior#
One submitted prompt → one agent session, visible as a thread, running the model/effort configured for it, with tool permissions surfaced in the UI.
Actual behavior#
Two sessions were created for the one submit (transcript files in ~/.claude/projects/<dir>/ timestamped 19:52:56.078Z and 19:52:56.360Z; the duplicate's transcript opens with a title-generation call quoting my prompt verbatim, then executes the task itself).
The duplicate:
- ran on
claude-haiku-4-5with no extended thinking, not the thread's configured model; - was not visible anywhere in the UI — no thread, no permission prompts;
- executed write operations against GitHub via
gh(issue closes / label edits in three PowerShell batches) about 60 seconds in, then exited after ~2 minutes — which is how I noticed: tracker state changed under my visible session mid-task.
Both the visible session's process and the duplicate were children of the app's server process (T3 Code (Alpha).exe ... apps/server/dist/bin.mjs --bootstrap-fd 3).
Impact#
Major degradation or frequent failure — a hidden session performed external writes under my GitHub identity with no way to see or stop it. Recoverable in my case.
Version or commit#
Desktop Alpha 0.0.31 (Windows installer, T3 Code (Alpha).exe ProductVersion 0.0.31.0)
Environment#
Windows 11 Home 10.0.26200; provider Claude Code (CLI at ~/.local/bin/claude.exe); thread model claude-fable-5 effort high; duplicate ran claude-haiku-4-5.
Logs or stack traces#
# Spawned CLI (child of T3 Code (Alpha).exe server process):
claude.EXE --output-format stream-json --verbose --input-format stream-json
--effort high --model claude-fable-5[1m] --permission-prompt-tool stdio --mcp-config "{...}"
# Duplicate session transcript (7ef79db8…): first entry 19:52:56.078Z is a
# title-generation queue item quoting the submitted prompt; model on its
# assistant turns is claude-haiku-4-5-20251001; 0 thinking blocks.
# Its three mutating tool calls (shown as evidence of unsupervised writes):
19:53:55Z PowerShell: foreach ($n in @(...)) { gh issue close $n --comment "..." }
19:54:29Z PowerShell: foreach ($n in @(...)) { gh issue edit $n --remove-label ... }
19:54:46Z PowerShell: Write-Host "... keeping as-is."
# Last activity 19:55:04Z, process exited.
Workaround#
None found — the duplicate isn't visible, so the only mitigation was auditing the external side effects afterwards. Happy to share redacted transcript excerpts if useful.
Follow-up: audited a second machine — bug is present in the Nightly too#
Ran the same transcript audit on a different Windows box (T3 Code (Nightly) v0.0.29.0, Claude Code provider). It's worse here than on the original machine.
Findings (project names + prompts redacted):
- 53 rogue title-sidecar executions across 280 sessions, spanning 2026-07-07 → 2026-08-05, over 5 different projects.
- Every hit matches the full signature (see below): the sidecar's first real turn is the title-generation prompt, yet later
claude-haiku-4-5assistant turns maketool_usecalls other thanStructuredOutput, and a sibling (real, visible) session file exists in the same project dir within ~1–3s. - Most were read-only (
gh pr view,git log/status, grep/find, MCPgetJiraIssue) — executed invisibly but harmless. - Write-capable side effects that actually landed:
- One run auto-posted 7 issue-tracker comments + created 4 issue links in a single invisible "grooming" pass.
- Another created 4 near-duplicate tickets + edited sprint fields on two others.
- A
gh pr createopened a phantom PR on a company repo (after an invisible commit +git push). - A
gh issue createopened a GitHub issue. - Two
git push --force-with-leasecalls rewrote remote branch history. - One run edited auth code + wrote a production config file and
Remove-Item -Recurse -Force'd a build dir. - Several
Stop-Process -Forcecalls killed allnode/dotnetprocesses — capable of disrupting the user's real in-flight work.
Because the sidecar runs your exact prompt in parallel with the real session, most mutations are silent duplicates of the intended action (duplicate comments, tickets, PRs) — easy to miss until the tracker/repo is cluttered.
No live twin was observed at audit time, but that's expected: the audit ran from the CLI, not the GUI. The bug fires per-submit from the GUI.
How anyone can check their own machine#
Read-only, needs only Node. Transcripts live in
~/.claude/projects/<project-dir>/*.jsonl(Windows:C:\Users\<you>\.claude\projects\).Detection signature — a rogue sidecar
.jsonlis one where all three hold:- The first real user turn is the title-generation prompt (
You write concise thread titles for coding conversations…), quoting your submitted message. - There are
tool_useblocks other thanStructuredOutputon assistant turns whosemodelisclaude-haiku-4-5-*. (A healthy sidecar makes exactly oneStructuredOutputcall — the title — and nothing else. Themodelon the working turns is the discriminator; don't flag a file just because a Haiku title turn appears.) - A sibling session file in the same project dir was created within ~1–3s — the real, visible session for the same submit.
Save as
shadow-audit.js, runnode shadow-audit.js:// Scans ~/.claude/projects for rogue T3 Code title-sidecar sessions. Read-only. const fs = require('fs'), path = require('path'), rl = require('readline'), os = require('os'); const base = path.join(os.homedir(), '.claude', 'projects'); const files = []; for (const d of fs.readdirSync(base)) { const dir = path.join(base, d); if (!fs.statSync(dir).isDirectory()) continue; for (const f of fs.readdirSync(dir)) if (f.endsWith('.jsonl')) files.push(path.join(dir, f)); } (async () => { const sessions = []; for (const f of files) { let firstTs = '', titleGen = false, haikuTools = {}, task = ''; await new Promise(res => { const r = rl.createInterface({ input: fs.createReadStream(f) }); r.on('line', l => { let d; try { d = JSON.parse(l); } catch { return; } if (d.timestamp && !firstTs) firstTs = d.timestamp; if (!titleGen) { const c = d.message && d.message.role === 'user' ? d.message.content : (d.content || ''); const t = typeof c === 'string' ? c : (Array.isArray(c) ? c.filter(x => x.type === 'text').map(x => x.text).join(' ') : ''); if (t.includes('You write concise thread titles')) { titleGen = true; const m = t.match(/User message:\s*([\s\S]{0,120})/); if (m) task = m[1].replace(/\s+/g, ' ').trim(); } } if (d.type === 'assistant' && d.message && /haiku/.test(d.message.model || '')) { for (const c of d.message.content || []) if (c.type === 'tool_use' && c.name !== 'StructuredOutput') haikuTools[c.name] = (haikuTools[c.name] || 0) + 1; } }); r.on('close', res); }); sessions.push({ f, firstTs, titleGen, haikuTools, task, size: fs.statSync(f).size }); } const rogue = sessions.filter(s => s.titleGen && Object.keys(s.haikuTools).length); console.log(`Scanned ${sessions.length} sessions. Rogue tool-using sidecars: ${rogue.length}\n`); for (const s of rogue) { const t = new Date(s.firstTs).getTime(); const sib = sessions.filter(o => o !== s && path.dirname(o.f) === path.dirname(s.f) && Math.abs(new Date(o.firstTs).getTime() - t) < 3000); console.log(`ROGUE ${s.firstTs} ${s.f} (${Math.round(s.size / 1024)}KB)`); console.log(` shadowed task: ${s.task || '(unknown)'}`); console.log(` haiku tool calls: ${JSON.stringify(s.haikuTools)}`); console.log(` same-second sibling: ${sib.map(x => path.basename(x.f)).join(', ') || 'NONE (weaker signal — verify manually)'}\n`); } })();Interpreting hits:
StructuredOutputonly / no hits → healthy.- Read-only tools (
Read,Grep,Glob,ToolSearch) → executed but likely harmless; still counts. - Write-capable tools → audit the side effects: for
Bash/PowerShellread the actualinput.command; forWrite/Editcheckgit status/git logaround the session timestamp; forAgent/Task*/Cron*/ScheduleWakeup/Skill/Workflowfollow the spawned work in the transcript. - GitHub-side: rogue actions are indistinguishable from yours except by timing —
gh api repos/<o>/<r>/issues/<n>/eventsshows your login; correlate event timestamps against the rogue transcript's tool-call timestamps.
Live check (Windows), while actively submitting in the GUI:
Get-CimInstance Win32_Process | Where-Object { $_.CommandLine -match 'claude' }More
claudeprocesses than open threads, parented byT3 Code*.exe, is the live form of the bug. (Note: a normal CLI subagent tree is parented byclaude.exe, notT3 Code*.exe— don't confuse the two.)Caveats: the scan only sees Claude Code provider transcripts. Field names are the Claude Code JSONL as of Aug 2026; if a build changes them and the scan returns implausible zeros, spot-check by hand:
grep -rl "concise thread titles" ~/.claude/projects | head.Related report #5734 covers the same problem and adds useful evidence.
This is the branch-name form of the same unrestricted Claude metadata helper in issue #5447. The report's title helpers happened to return JSON correctly, while its branch helpers edited, tested and committed the quoted task. That difference does not imply a separate implementation: main routes both operations through runClaudeJson with identical unrestricted tool permissions.
I'm linking the report here before I close it as a duplicate during an automated pass. The source report and its attachments will remain available at #5734.
Related report #4061 covers the same problem and adds useful evidence.
The marker-file reproduction and issue #5447's transcript audits identify the same Claude text-generation subprocess executing the quoted user task with real tools and bypassed permissions. Main confirms the helper has unrestricted tools and runs in the supplied workspace. Issue 5447 is the stronger canonical because its two-machine transcript audit identifies the helper model and proves external writes.
I'm linking the report here before I close it as a duplicate during an automated pass. The source report and its attachments will remain available at #4061.
Related report #3594 covers the same problem and adds useful evidence.
The skill runs twice because the visible conversation and Claude title helper both execute the first message. That is the same auxiliary text-generation tool execution proven by issue #5447's transcripts. Current source passes the message into a title prompt and launches the helper with bypassed permissions and no tool restriction. The source issue adds a small deterministic skill reproduction and an explicit enterprise-policy objection to the bypass flag, which must both remain tracked.
I'm linking the report here before I close it as a duplicate during an automated pass. The source report and its attachments will remain available at #3594.
https://github.com/pingdotgg/t3code/issues/8773 adds a macOS 0.0.36 reproduction of the same unrestricted Claude title helper. Its transcript records 45 tool calls, including reverting four files with uncommitted work and creating a commit, without returning title JSON. Consolidating that report here; its transcript details and data-loss evidence remain available at the link, and the bug remains open.
juliusmarminge closed this
Sign in to join this conversation.
Follow-up with frequency data — this is not a one-off race. I scanned my local provider transcripts (
~/.claude/projects, 289 session files across 8 project directories, 2026-07-07 → 2026-08-05) for the signature.Mechanism, as visible from the transcripts: every submit spawns a Haiku sidecar session whose first entry is the title-generation request ("You write concise thread titles… User message: "). Normally it emits one
StructuredOutputtitle and stops — I found 17 that did exactly that. But 19 sidecars went past the title and executed the quoted user task with tools, each one starting the same second as its real, visible sibling session:Attribution check: in all 19, the tool_use blocks are on assistant turns whose
modelisclaude-haiku-4-5-20251001; no other model appears in those files, ruling out "main session recorded in the same file".So the title-generation lane appears to sometimes receive the full tool/MCP configuration and treat the quoted "User message:" as a task to execute — with the user's real credentials and no UI surface. Rate in my data: 19 of 36 standalone title sidecars (~1 in 2 when a standalone sidecar file is created at all; most submits don't produce one).
Happy to provide redacted transcripts of any of these.