Skip to content

fix(grok): preserve safe TUI composer navigation - #867

Draft
vansin wants to merge 7 commits into
fix/grok-copresence-deny-terminal-toolfrom
fix/grok-copresence-safe-navigation
Draft

fix(grok): preserve safe TUI composer navigation#867
vansin wants to merge 7 commits into
fix/grok-copresence-deny-terminal-toolfrom
fix/grok-copresence-safe-navigation

Conversation

@vansin

@vansin vansin commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

What changed

  • preserve safe Left/Right/Home/End/Delete TUI composer editing without weakening the immutable approval-mode boundary
  • return arbitration to idle after a blocked slash command so the next Dashboard task is not stranded
  • retire a terminal co-presence runtime before the next task instead of caching runtime_closed forever
  • bind the inspected CommHub MCP target to the exact pre-resolved Bun executable path
  • correlate batched exact-profile automatic permissions as a bounded multiset, including duplicate tools and out-of-request-order resolutions
  • keep manual overlap, unmatched lifecycle events, overflow, and unresolved terminal completion fail-closed

Root cause

The live 通信狗 incidents had three layers. Its original x-search profile denied a repository tool that Grok nevertheless auto-resolved; the bridge correctly failed closed, but agent-node cached that terminal runtime. The repo-read pilot then exposed an obsolete literal-bun audit comparison. After those were fixed, the real Grok event stream emitted three automatic permission requests first (search_tool, list_dir, search_tool) and resolved them later as (search_tool, search_tool, list_dir). A scalar pending-permission slot misclassified this valid batched lifecycle as an approval-boundary violation, after which six queued tasks failed within seconds.

Frozen coordinates

  • product source: b830403b82a97a98ec004e59c86eb294ddfd1771
  • report-only head: 19af299adea89cb6296a5d3971b574ad88e2c423
  • exact candidate image: sha256:261ade0fd44147370df56a7377f409c840f3e65a07aa472174e7761184b45ecb
  • candidate agent-node bundle SHA-256: 5c0d5cbcfb0350af1eb27e78de1ccd5902c5ba22be732df415fe26851c269a45

This Draft remains stacked on the existing Grok co-presence work. It does not publish npm or merge into the base branch.

Validation

  • the new batched-permission fixture was witnessed red on the previous runtime with duplicate preview automatic permission request
  • exact-source focused Docker runtime/profile/near-miss layer: 84 pass / 0 fail / 3 files
  • exact-source full test725 domain: 1288 pass / 0 fail / 92 files; named mutation red; RESULT: PASS
  • exact source built successfully into the candidate runtime and produced the bundle SHA above
  • single-node pilot retained exact tmux session 通信狗 with 0:node and 1:tui; it reached TUI input-ready, CommHub registration, and SSE, and Hub reports idle with zero pending/in-flight tasks
  • no production task was synthesized, retried, or sent during recovery

Full evidence: docs/tests/report-grok-copresence-fatal-recovery-7914755a.txt.

Honest limits

  • owner-origin Dashboard behavior remains the final UAT; task traffic stays paused until that explicit test
  • /model remains intentionally blocked: the current FIFO protocol cannot yet prove when Grok's interactive model picker has returned to the composer. Persisted model changes still require a controlled config update and restart.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant