Repository navigation
fix(server): threads stay working while Claude starts a wake turn - #15055
Conversation
When background work finished while the root was idle, the Claude adapter started the wake run only at the wake turn's first output. Claude thinks for 3 to 49 s before that, so the thread showed as done, left the Working shelf, then came back. Claude opens every turn with a root `init` frame about 20-110 ms after the notification. The adapter now starts the wake run on that frame, and the drain keeps the run open for the output that follows. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughClaudeAdapterV2 now recognizes a root ChangesClaude wake-turn handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue is established for the Claude wake-turn change; it is ready to merge after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused Claude wake-status fix with a targeted regression test and no schema, default, infrastructure, or sensitive-path changes. An unresolved High finding identifies a normal-turn init race that can create a phantom continuation, so that correctness risk remains a blocker to merging. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
…ngdotgg#15055) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
## What's Changed * fix(web): thread panel shows the remote machine a thread runs on by @t3dotgg in pingdotgg/t3code#14972 * fix(web): Claude skill calls show the skill name by @t3dotgg in pingdotgg/t3code#14980 * test(server): the fake Claude CLI is a fixture file, not a generated string by @yordis in pingdotgg/t3code#14950 * fix(server): Claude subagents show the model their agent file picks by @t3dotgg in pingdotgg/t3code#14994 * fix(client-runtime): format subagent descriptions as display names by @Yash-Singh1 in pingdotgg/t3code#14999 * fix(web): outdated servers can be updated even when the client can't connect by @juliusmarminge in pingdotgg/t3code#15002 * fix(web): new worktree threads no longer flicker while starting by @t3dotgg in pingdotgg/t3code#15019 * fix(server): subagent threads stop publishing tombstones to the relay by @juliusmarminge in pingdotgg/t3code#15016 * fix(client-runtime): reconnects back off with jitter and keep healthy sockets by @t3dotgg in pingdotgg/t3code#14897 * fix(server): working timers no longer reset on every background wake by @t3dotgg in pingdotgg/t3code#15029 * fix(server): threads settle as soon as an agent merges their PR by @t3dotgg in pingdotgg/t3code#15024 * fix(opencode): fill blank reasoning labels by @Yash-Singh1 in pingdotgg/t3code#14978 * fix(preview): agent browser clicks no longer steal your composer focus by @t3dotgg in pingdotgg/t3code#15008 * fix(web): Woke dismiss syncs, preview mute is back, and subscription retries back off by @t3dotgg in pingdotgg/t3code#15034 * chore: docs, dev scripts and CI catch up with orchestration V2 by @t3dotgg in pingdotgg/t3code#15041 * fix(server): Claude V2 turns start on Windows with the default binary path by @maria-rcks in pingdotgg/t3code#15021 * fix(web): diff panel opens on all branch changes, not just uncommitted by @t3dotgg in pingdotgg/t3code#15005 * fix(server): threads stay working while Claude starts a wake turn by @t3dotgg in pingdotgg/t3code#15055 * feat(web): mod+alt+enter on an existing thread sends and opens a new thread by @maria-rcks in pingdotgg/t3code#15050 * fix(chat): sending on an older thread no longer jumps to the top by @t3dotgg in pingdotgg/t3code#15059 * chore: add bmdavis419 to triage exemptions by @bmdavis419 in pingdotgg/t3code#15062 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261003.2610...v0.0.46-nightly.20261003.2623 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261003.2623
## What's Changed * fix(web): thread panel shows the remote machine a thread runs on by @t3dotgg in pingdotgg/t3code#14972 * fix(web): Claude skill calls show the skill name by @t3dotgg in pingdotgg/t3code#14980 * test(server): the fake Claude CLI is a fixture file, not a generated string by @yordis in pingdotgg/t3code#14950 * fix(server): Claude subagents show the model their agent file picks by @t3dotgg in pingdotgg/t3code#14994 * fix(client-runtime): format subagent descriptions as display names by @Yash-Singh1 in pingdotgg/t3code#14999 * fix(web): outdated servers can be updated even when the client can't connect by @juliusmarminge in pingdotgg/t3code#15002 * fix(web): new worktree threads no longer flicker while starting by @t3dotgg in pingdotgg/t3code#15019 * fix(server): subagent threads stop publishing tombstones to the relay by @juliusmarminge in pingdotgg/t3code#15016 * fix(client-runtime): reconnects back off with jitter and keep healthy sockets by @t3dotgg in pingdotgg/t3code#14897 * fix(server): working timers no longer reset on every background wake by @t3dotgg in pingdotgg/t3code#15029 * fix(server): threads settle as soon as an agent merges their PR by @t3dotgg in pingdotgg/t3code#15024 * fix(opencode): fill blank reasoning labels by @Yash-Singh1 in pingdotgg/t3code#14978 * fix(preview): agent browser clicks no longer steal your composer focus by @t3dotgg in pingdotgg/t3code#15008 * fix(web): Woke dismiss syncs, preview mute is back, and subscription retries back off by @t3dotgg in pingdotgg/t3code#15034 * chore: docs, dev scripts and CI catch up with orchestration V2 by @t3dotgg in pingdotgg/t3code#15041 * fix(server): Claude V2 turns start on Windows with the default binary path by @maria-rcks in pingdotgg/t3code#15021 * fix(web): diff panel opens on all branch changes, not just uncommitted by @t3dotgg in pingdotgg/t3code#15005 * fix(server): threads stay working while Claude starts a wake turn by @t3dotgg in pingdotgg/t3code#15055 * feat(web): mod+alt+enter on an existing thread sends and opens a new thread by @maria-rcks in pingdotgg/t3code#15050 * fix(chat): sending on an older thread no longer jumps to the top by @t3dotgg in pingdotgg/t3code#15059 * chore: add bmdavis419 to triage exemptions by @bmdavis419 in pingdotgg/t3code#15062 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261003.2610...v0.0.46-nightly.20261003.2623 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261003.2623
- Servidor: runs não ficam mais travadas (pingdotgg#15048), com ajustes em ProviderSessionManager, RunExecutionService, EventSink e EffectOutbox na orchestration-v2, além de novos testes de persistência - Servidor: threads permanecem em estado "working" enquanto o Claude inicia um wake turn (pingdotgg#15055), com mudanças no ClaudeAdapterV2 e no ProviderTurnStartService - Chat: enviar mensagem em uma thread antiga não faz mais a timeline pular para o topo (pingdotgg#15059), com correção na lógica do MessagesTimeline - Web: novo atalho mod+alt+enter em uma thread existente envia a mensagem e abre uma nova thread (pingdotgg#15050), incluindo contrato de keybindings, configurações e documentação do usuário - Mobile: ajustes na lógica de atividade de thread (threadActivity) com cobertura de testes ampliada - Chore: bmdavis419 adicionado às exceções de triagem (pingdotgg#15062) - Conflitos: 1 arquivo conflitou e foi resolvido manualmente, mantendo as modificações próprias do fork Sync automatico t3code-sync em 2026-10-03T06:10:17-03:00
Problem
A Claude thread that waits on a background command leaves "working", drops back into the inbox for a few seconds, then returns to "working" when Claude reacts to the finished command.
The adapter started the wake run only at the wake turn's first
assistant/userframe. Claude thinks before that frame. In the local provider logs,initto first output took 3 to 49 s (often 5 to 30 s). During that time the roster was already empty and no run existed, so the thread looked done.From the reported thread (
8092e030):#15029 stops the timer reset on wakes, but not this status gap.
Change
Claude opens every turn with a root
system/initframe. With no T3 turn active, that turn is a wake. In 28 out of 28 idle notifications in the local logs,initcame 21 to 108 ms after the notification.bufferWakeMessagebuffers thatinitand offers the wake continuation on it.initas a native wake frame. The run stays open for the live output and does not settle at once.The gate for a notification alone is unchanged: with no
init, no run starts.This also covers a background task that ends while a turn is still running. In that case the wake turn has no buffered notification, and before this change it got a run only at its own
result.Claude only. The other adapters detect wakes in their own way.
Scope and approval
Small, focused fix of a bug Theo reported.
Verification
starts the wake run when Claude opens the wake turn, before its output. It fails onmain(no continuation request afterinit). It also fails when only the drain change is reverted (the run settles before the output).ClaudeAdapterV2.test.ts,ClaudeReplayFixtures.integration.test.ts,ProviderContinuationService.test.ts,runtimeLayer.test.ts: 204 tests pass. TheOrchestratorreplay fixture suites pass (129).apps/servertypecheck is clean.Not checked: a live run in the desktop app. The roster still clears about 60 to 150 ms before the new run appears, so a very short blink can remain.
Created with Claude Opus 5.5 in Claude Code (T3 Code).
🤖 Generated with Claude Code