Repository navigation
Conversation
Use the existing durable queue when Grok cannot steer an active turn safely. Keep attachments intact and document the explicit Restart limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Additional final verification on head fd3e3ef:
This remains a focused safe-queue fallback, not native mid-turn interjection. Explicit Restart is unsupported and held roots can still delay queued messages, as documented in the PR. |
|
Ready for maintainer review at fd3e3ef. The branch is conflict-free against current main, maintainer edits are enabled, 83 targeted tests and the server bundle build pass locally, and the regressions fail when the Grok-only capability override is removed. The upstream CI run is currently The scope decision is explicit: use the existing attachment-capable queue instead of interrupting running Grok tools; Stop remains supported, while explicit Restart becomes unsupported. Native mid-turn interjection and held-root/background lifecycle changes remain out of scope. Happy to address concrete review findings or adjust to the preferred scope. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Grok steering capability and policy packages/provider-grok/src/server/adapter.ts, apps/server/src/orchestration-v2/CommandPolicy.test.ts |
Grok’s turn capabilities now disable interrupt-and-restart steering. Policy tests cover queued steering and verify that forced restart is rejected with the interrupt_restart_steering capability error. |
Queued follow-ups and attachments apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts, docs/user/composer.md |
The integration test checks that image and pasted-text attachments remain on a queued Grok follow-up when its turn starts, and that no steering call occurs. The composer docs state that follow-ups wait for the current turn, Stop cancels current work, and explicit Restart is unsupported. |
Priority:
Estimated code review effort: 2 (Simple) | ~12 minutes
Severity of issue fixed: Medium
Possibly related PRs
- pingdotgg/t3code#26715: Adds the capability-based queueing path that this change uses for Grok follow-ups.
- pingdotgg/t3code#25944: Exposes queue, auto, steer, and restart delivery modes through
t3 thread send; this change affects Grok’s policy for those modes. - pingdotgg/t3code#24653: Addresses follow-ups during active foreground tools for Claude, using a different provider-specific approach.
Suggested reviewers: maria-rcks, shivamhwp, juliusmarminge
Merge Risk: 
Minimal · up to fd3e3
-
Grok follow-ups wait for the current turn. No merge-blocking issue was established.
Pre-merge checks: 
4
-
Full details: Linked Issues check
-
Explanation
The PR addresses the active coding requirements in
#27014.packages/provider-grok/src/server/adapter.tssets GroksupportsSteeringByInterruptRestarttofalse, so the existing policy selects the durable queue instead of interrupt/restart steering. The policy tests cover automatic and explicit Steer delivery, Grok Stop permission, and rejection of explicit Restart. The orchestration integration test covers queued delivery with image and file attachments. The existing Stop implementation remains unchanged. The documentation discloses queued behavior and unsupported Grok Restart behavior. The issue permits this queueing fallback when native steering is not lifecycle-safe.
Full details: Out of Scope Changes check
-
Explanation
The changed files stay within
#27014. The production change is a Grok-only capability override. The policy and orchestration changes add regression coverage for queue selection, attachment retention, and Restart behavior. The documentation describes the changed user behavior. No shared production policy, other provider, client, contract, hook, or native Grok interjection changes are included.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Marking this PR as draft while reconsidering the direction. The requested outcome is native mid-turn Grok steering, including images, not merely queueing until the turn ends. This patch is a cancellation mitigation and should not be presented as implementing that outcome. Installed Grok ACP interjection worked in our live foreground-tool test. The remaining native-integration question is lifecycle ownership when interjection races prompt completion: a late native fallback prompt must remain tracked and reachable by Stop, with no duplicate delivery. That boundary needs addressing rather than assuming queueing is the final solution. The current code remains the queue-only mitigation; no native steering implementation has been pushed. |
Grok follow-ups currently interrupt and restart the active prompt, cancelling tools the user asked to keep running. This queues them through T3's existing durable queue instead, retaining normal image and file attachments.
Closes #27014.
Change
Override only Grok's
supportsSteeringByInterruptRestartcapability tofalse, following the provider-specific fallback used for Copilot in #26715. Shared command policy already queues automatic and explicit Steer follow-ups when neither steering path is safe. No shared production policy, client, contract, hook, or Grok binary changes.This is queueing, not native mid-turn steering. Grok already supports
_x.ai/interject, including structured image content, but merely wiring it up does not handle its completion race: an interjection arriving after the intended prompt ends can start native fallback work outside the current T3 turn. #27014 records that separate lifecycle boundary. This PR prevents destructive follow-ups without adding a text-only hook workaround or a new attachment limit.Behavior and limits
t3_thread_send, because the existing restart policy uses the same capability. Use Stop, then send a new message when cancellation is intended. User docs disclose this.Scope / contribution policy
No maintainer approval has been given on #27014. I am submitting this under the very-small focused obvious-bug exception: the defect is cancellation of ongoing work by a follow-up, and the production change is a Grok-only capability override using an existing, merged fallback. I recognize that maintainers may still require prior product-direction discussion because Steer and explicit Restart behavior change. I am not treating the issue or Copilot precedent as approval.
Verification
Regression tests failed before the production change: Grok policy selected steering, forced Restart succeeded, and the orchestration regression observed an interrupt of the original provider turn. After the override:
vp test run apps/server/src/orchestration-v2/CommandPolicy.test.ts apps/server/src/orchestration-v2/SteeringCompletion.integration.test.ts apps/server/src/orchestration-v2/Adapters/GrokAdapterV2.test.ts: 46 passed, rerun on final branch rebased onto960d5761c13f.vp run check:changed: passed on the final rebased commit, exactly four PR files. Format, lint, both knip passes, GraphQL generation, 10 affected package typechecks, and 37 selected tests passed. Nine of ten typecheck tasks reused cache.Native runtime transcript
macOS arm64, Grok Build 1.0.70 (
f50904eaee6c), configured custom-gateway Luna model. Actual Grok adapter/ACP runtime plus the orchestration harness and in-memory database; temporary workspace, attachment state and isolatedGROK_HOME. No live T3 database or installed application modifications.First prompt ran a foreground
sleep 12; echo FOREGROUND_DONE. Follow-up with a PNG and text-file attachment was sent at the tool-running milestone:The logger compared image bytes and the resolved file path without publishing their contents. This establishes attachment transport, not semantic image understanding or file reading. Native runtime exercise covers after; the failing source-state regressions establish before. No browser/mobile UI run or additional real Stop exercise was performed; this is a server/provider-only change and existing Stop code is untouched.
Implemented and reviewed with Codex GPT-6.1 Sol through T3 Code; final review and submission with Claude Code.
🤖 Generated with Claude Code