Skip to content

fix: integrate Grok YOLO permission fallback and remove Auto - #533

Merged
lodystage[bot] merged 3 commits into
feat/independent-plan-modefrom
feat/acp-grok-approve-all
Sep 9, 2026
Merged

fix: integrate Grok YOLO permission fallback and remove Auto#533
lodystage[bot] merged 3 commits into
feat/independent-plan-modefrom
feat/acp-grok-approve-all

Conversation

@lodystage

@lodystage lodystage Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Related issue

Refs #503

#503 is a stack dependency (independent Plan mode), not an issue to close. Companion adapter PR: LodyAI/acp-extension-grok#15.

Problem / pressure

Grok can still emit tool permission requests while Always Approve is selected. Forwarding these to Lody can expose a pending approval UI before the host responds, and Auto remains selectable despite lacking a reliable acknowledgement contract.

Summary

  • Pin Grok adapter 0.1.3 from the companion PR, which answers new known-session YOLO tool permissions directly using allow_once, then allow_always.
  • Remove Auto from Lody's static Grok permission catalog and its expected options.
  • Document the adapter/host ownership boundary and preserve the existing host fallback for older adapters and already forwarded requests.
  • Add the source analysis, implementation decision record, and draft permission Spec.

This PR targets feat/independent-plan-mode (#503), preserving Core 0.1.1 and explicit Plan approval. The companion Grok PR #15 is merged; this PR pins its merge commit c962338e. Merge #503 before this integration.

Before / after

Before After
Grok advertises Ask, Auto, Always Approve Ask and Always Approve; old startup Auto restores as Ask
New native YOLO tool requests reach the host Adapter answers eligible allow options before any host permission event
Host owns every permission Questions, mode-switch approvals, unknown sessions, and requests without usable allow options remain interactive
runtime permission request
  -> accepted YOLO + known session + ordinary tool + allow option
       -> selected outcome to runtime
  -> otherwise
       -> existing host interaction

Test plan

  • 57/57 adapter tests passed on the final source in a scratch copy with locally compiled Core 0.1.1.
  • pnpm --dir packages/acp-extension-grok run build passed syntax checks.
  • Scoped Prettier checks and git diff --check passed.
  • A source-derived probe confirmed static Grok permission options match the adapter catalog.
  • pnpm run docs check passed with existing AGENTS-size warnings.
  • pnpm check and pnpm format were attempted but this nested worktree has no root node_modules (tsgo and prettier missing respectively).
  • No full application build, authenticated Grok turn, or runtime artifact publication.

Context handoff

Instructions for reviewing agents

  • Review focus: Check the Grok gitlink and static catalog together with the companion adapter PR's session ownership and permission response boundaries.
  • Decisions to challenge: Prefer a one-time grant, permit allow_always only as a fallback, and normalize old Auto startup values to Ask.
  • Plausible failures / evidence gaps: Real provider integration is untested; runtime mode changes remain optimistic and adapter-resolved requests do not enter host permission history.

Authoring context

  • User goal / directives: Remove Grok Auto mode and automatically select an allow option under YOLO, then create reviewable PRs.
  • Constraints / non-goals: Preserve questions, explicit Plan/mode-switch decisions, unknown-session behavior, and the existing host fallback for old adapters.
  • Risk-bearing decisions: A native allow_always option may persist an authorization; the adapter only uses explicit ACP allow kinds with valid option ids.
  • Destructive or irreversible behavior: No data migration or cleanup; native persistent grants may outlive a later switch back to Ask.
  • Deliberately not done or tested: Full workspace checks were blocked by missing dependencies; no authenticated model turn or runtime publication was performed.
  • Unknowns / confidence: Deterministic protocol tests pass; shipped behavior still needs the companion adapter artifact and host integration to be released together.

@lodystage
lodystage Bot marked this pull request as ready for review September 9, 2026 01:39

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 817082a6b1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@@ -1 +1 @@
Subproject commit f3f59e1a4528e5e201b24eccb4b3548987bbcc67
Subproject commit c962338e3e6e68858e0bf92e9671a84b9a07e055

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Confirm effective YOLO before auto-approving requests

When a managed Grok policy refuses to enable YOLO, the adapter still records the requested always-approve value locally because _x.ai/yolo_mode_changed has no acknowledgement; the new handler then trusts that optimistic value and automatically selects allow_once or even persistent allow_always for requests the runtime left interactive. This bypasses the policy's approval boundary, so interception must depend on confirmed effective YOLO state or leave the request interactive when confirmation is unavailable.

AGENTS.md reference: AGENTS.md:L132-L134

Useful? React with 👍 / 👎.

@lodystage
lodystage Bot merged commit c49f2dd into feat/independent-plan-mode Sep 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant