fix(server): queue background notifications during active tools - #15892
Conversation
- Preserve Claude's native tool cancellation metadata and avoid interrupting active tools for automatic deliveries - Queue scheduled prompts for their bound thread
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes scheduled prompts from automatic dispatch to queued dispatch and alters Claude's active-tool steering behavior, affecting production orchestration semantics. The scheduled-task default change requires human review. No code changes detected at 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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. 8 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughThe Claude adapter now records native tool non-execution metadata and marks cancelled tool results. Orchestration uses provider capability information when selecting delegated-completion delivery behavior. Scheduled prompts to existing threads use queue mode. Tests cover adapter results, steering behavior, and delivery scenarios. ChangesClaude orchestration
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant Orchestrator
participant ScheduledTaskService
participant ClaudeAdapterV2
participant ClaudeSDK
alt User steering
User->>Orchestrator: Dispatch steer-active message
Orchestrator->>ClaudeSDK: Offer priority-now message
ClaudeSDK->>ClaudeAdapterV2: Return cancelled tool results and metadata
ClaudeAdapterV2->>Orchestrator: Project cancelled items
else Automatic delivery
ScheduledTaskService->>Orchestrator: Dispatch existing-thread prompt in queue mode
ClaudeSDK->>ClaudeAdapterV2: Return completed tool results
ClaudeAdapterV2->>Orchestrator: Project completed tool items
Orchestrator->>Orchestrator: Process queued delivery
end
Suggested reviewers: Merge Risk: ⚪ Minimal · up to Claude background notifications are routed away from active steering during tool work. No merge-blocking issue is established by the available evidence. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Note Generated by GPT 6.1 Sol I am leaving CodeRabbit's 80% docstring-coverage suggestion unimplemented. The project's AGENTS.md asks comments to explain usage and constraints that are difficult to discover from the code. The new code already explains the undeclared SDK metadata and the native cancellation replay. Adding generic docstrings to meet a percentage would expand this fix without clarifying its behavior. After merging current main, all 223 focused tests passed, along with the server and contracts typechecks. The PR description now records those results and the replay's limitations. |
Upstream pingdotgg#15892 makes scheduled runs queue instead of steering, the fork's 68b5524 change, so the fork line, its test and README bullet are dropped. PreviewAutomationBroker keeps the fork's host-reset reconnect message on pingdotgg#15219's new scope shape. Silent breaks fixed: the settle cascade moves to KeyedLock (pingdotgg#15577 deleted KeyedSerialExecutor), and the session tools read the new McpInvocationScope thread, refusing a client outside one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
## What's Changed * fix(cli): reject accidental server launches by @maria-rcks in pingdotgg/t3code#15795 * feat(clients): reach one environment over several routes by @juliusmarminge in pingdotgg/t3code#15467 * feat(clients): learn an environment's LAN and tailnet addresses by @juliusmarminge in pingdotgg/t3code#15468 * fix(server): share MCP tool presentation across providers by @juliusmarminge in pingdotgg/t3code#15475 * revert(chat): remove automatic file-link repair by @maria-rcks in pingdotgg/t3code#15824 * perf(web): validate monospace fonts when selected by @maria-rcks in pingdotgg/t3code#15642 * fix(server): expand home-relative media paths by @maria-rcks in pingdotgg/t3code#15618 * fix(server): recover Linux runtime directory for device hub by @maria-rcks in pingdotgg/t3code#12402 * fix(web): center icons in thread details icon buttons by @RakshithBhat03 in pingdotgg/t3code#15669 * fix(mobile): back from an agent's thread returns to its parent by @AKolenda in pingdotgg/t3code#15068 * fix(dev): worktree setup never deletes a real env file by @juliusmarminge in pingdotgg/t3code#15845 * fix(server): drop the duplicate Option import that breaks main CI by @juliusmarminge in pingdotgg/t3code#15847 * fix(dev): write bootstrap warnings directly to stderr by @maria-rcks in pingdotgg/t3code#15865 * fix(mobile): a message that fails to send now says why in the thread by @shivamhwp in pingdotgg/t3code#15807 * fix(server): queue background notifications during active tools by @Yash-Singh1 in pingdotgg/t3code#15892 * refactor(server): share one keyed lock that releases idle keys by @juliusmarminge in pingdotgg/t3code#15577 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261004.2657...v0.0.46-nightly.20261005.2667 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261005.2667
## What's Changed * fix(cli): reject accidental server launches by @maria-rcks in pingdotgg/t3code#15795 * feat(clients): reach one environment over several routes by @juliusmarminge in pingdotgg/t3code#15467 * feat(clients): learn an environment's LAN and tailnet addresses by @juliusmarminge in pingdotgg/t3code#15468 * fix(server): share MCP tool presentation across providers by @juliusmarminge in pingdotgg/t3code#15475 * revert(chat): remove automatic file-link repair by @maria-rcks in pingdotgg/t3code#15824 * perf(web): validate monospace fonts when selected by @maria-rcks in pingdotgg/t3code#15642 * fix(server): expand home-relative media paths by @maria-rcks in pingdotgg/t3code#15618 * fix(server): recover Linux runtime directory for device hub by @maria-rcks in pingdotgg/t3code#12402 * fix(web): center icons in thread details icon buttons by @RakshithBhat03 in pingdotgg/t3code#15669 * fix(mobile): back from an agent's thread returns to its parent by @AKolenda in pingdotgg/t3code#15068 * fix(dev): worktree setup never deletes a real env file by @juliusmarminge in pingdotgg/t3code#15845 * fix(server): drop the duplicate Option import that breaks main CI by @juliusmarminge in pingdotgg/t3code#15847 * fix(dev): write bootstrap warnings directly to stderr by @maria-rcks in pingdotgg/t3code#15865 * fix(mobile): a message that fails to send now says why in the thread by @shivamhwp in pingdotgg/t3code#15807 * fix(server): queue background notifications during active tools by @Yash-Singh1 in pingdotgg/t3code#15892 * refactor(server): share one keyed lock that releases idle keys by @juliusmarminge in pingdotgg/t3code#15577 **Full Changelog**: pingdotgg/t3code@v0.0.46-nightly.20261004.2657...v0.0.46-nightly.20261005.2667 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.46-nightly.20261005.2667
Automatic child-completion notices and scheduled prompts could interrupt Claude's pending tools. Claude then returned cancellation text that the parent model interpreted as a user refusal.
Keep Claude child-completion notices in T3's durable queue by recording that its native steering cancels pending tools. Bound scheduled prompts also queue behind active work. Explicit user steering retains its immediate behavior. Preserve native per-tool non-execution metadata and project cancelled calls as cancelled, distinct from permission denials.
For Claude,
completionWake: alwaysnow delivers after the active run finishes. Existing delivery identities, deduplication, and recovery remain in use.Validation after merging current
main:The regression replays the captured native frame shapes and Claude's queue-abort behavior through the real T3 services and adapter. It does not run a live Claude session. The live T3 database and installed application were untouched.
Closes #15351
Model: GPT 6.1 Sol. Harness: Codex.