Skip to content

fix(grok): map Always allow to allow_once when Grok omits allow_always - #228

Merged
leoisadev1 merged 8 commits into
mainfrom
leoisadev1/t3-port-grok-approvals
Sep 13, 2026
Merged

leoisadev1 merged 8 commits into
mainfrom
leoisadev1/t3-port-grok-approvals

Conversation

@leoisadev1

Copy link
Copy Markdown
Member

Problem

Grok 4.6 often omits ACP allow_always. Choosing Always allow this session then mapped to a missing option and cancelled the turn.

Changes

selectGrokPermissionOptionId falls back to allow_once when allow_always is absent. The command still runs.

Session-scoped auto-approval memory from the same upstream work is not in this change.

Upstream

Adapted from pingdotgg/t3code#8358. Stacked on #224.

Verification

  • Unit test: acceptForSession maps to allow-once when allow_always is omitted.
  • Targeted lint passed.

Leave this PR and its base open.

Made by Grok 4.6 High in Grok Build via Orca.

…anges

Grok health checks opened a full ACP session, so background probes could hang
on authenticate or boot every configured MCP server. They also never reported
login state, and the snapshot locked model changes to a new thread even though
session/set_model already works.

The check now runs grok --version, grok models, then a single ACP initialize
and reads models from _meta.modelState. Failed initialize degrades to warning.
grok-build is never sent as a model id.

Adapted from pingdotgg#9154 and pingdotgg#8392.

Made by Grok 4.6 High in Grok Build via Orca.
Keep the Grok probe PR current with main.
… steers

Grok CLI dropped session/cancel because effect-acp encoded notifications as
requests with an empty id and headers. Stop then queued the next prompt behind
work that never cancelled.

Notifications now encode as JSON-RPC with no id. Cancel waits for that write.
A mid-turn send cancels the in-flight prompt and continues the same turn.

Adapted from pingdotgg#9154. Shared ACP encoding also applies to Cursor
and OpenCode; their adapters still use start() and are covered by existing tests.

Made by Grok 4.6 High in Grok Build via Orca.
Grok 4.6 often omits ACP allow_always. Choosing Always allow this session then
mapped to a missing option and cancelled the turn.

Fall back to allow_once so the command still runs. Session-scoped auto-approval
memory from the same upstream work is not in this change.

Adapted from pingdotgg#8358.

Made by Grok 4.6 High in Grok Build via Orca.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
akeru-bot-landing Skipped Skipped Sep 10, 2026 6:00pm UTC

Request Review

@github-actions github-actions Bot added type:provider Agent provider contribution. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S labels Sep 10, 2026
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR improves Grok permission handling when allow_always is unavailable and ensures a stored completion is emitted after the final superseded prompt settles. The earlier TypeScript fixture issue is fully addressed by preserving ACP literal types in the test request.

Confidence Score: 5/5

Safe to merge.

There are no outstanding findings. The previously reported test fixture type-widening issue is fully fixed: the request now uses satisfies EffectAcpSchema.RequestPermissionRequest, preserving the permission-kind literals required by the selector.

Reviews (4): Last reviewed commit: "merge main into grok approvals stack" | Re-trigger Greptile

Comment thread apps/server/src/provider/Layers/GrokAdapter.test.ts
CI typecheck inferred permission option kinds as string, so the new allow_once
fallback test failed to compile.

Annotate the fixture with satisfies RequestPermissionRequest so the ACP
literal union is preserved.

Made by Grok 4.6 High in Grok Build via Orca.
A successful replacement could be reported as cancelled when the superseded
prompt finished local draining last. The last in-flight settlement owned the
terminal state.

Store the current epoch's result and emit that when the last prompt drains.
Unit tests cover both settlement orders.

Made by Grok 4.6 High in Grok Build via Orca.
Keep the Grok permission fallback stacked on the steered-turn epoch settlement fix.
@leoisadev1
leoisadev1 changed the base branch from leoisadev1/t3-port-grok-cancel to main September 13, 2026 22:05
@leoisadev1
leoisadev1 merged commit 0b11889 into main Sep 13, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the leoisadev1/t3-port-grok-approvals branch September 13, 2026 22:16
This was referenced Sep 13, 2026

This branch was successfully deployed

1 active deployment
Preview — 8e42e718 Deployed Sep 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S type:provider Agent provider contribution. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant