Repository navigation
fix(native-chat): never run a chat on an older host with more access than Ask for approval allows - #29442
Merged
Conversation
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…-check on reconnect
…st; re-ask while held
nwparker
force-pushed
the
nwparker/native-chat-ask-mode-capability
branch
from
October 16, 2026 05:10
6ef2ee0 to
8cfe1ad
Compare
Merged
1 of 2 tasks
nwparker
added a commit
that referenced
this pull request
Oct 16, 2026
… permission tests (#29891) #29335 gave Grok chats their own permission modes, so on a paired host that predates per-chat modes a Grok chat is now checked like Claude and Codex; that is intended. #29442's tests, merged a day earlier, used Grok as the agent without modes. Use Gemini, which still has none.
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
If your SSH host or paired machine is still running an Orca server from 1.4.224 or earlier, that server doesn't know about the chat setting "Ask for approval". It runs Claude and Codex chats with its own old Agent Permissions, which by default skip every approval. This desktop showed "Ask for approval" anyway, so a remote chat could run commands without asking. Now Orca checks what the host will actually do first. If the host would give the agent more access than you asked for, Orca won't start the chat or send the message, and it tells you to update Orca on that host.
What Changed
Before: with Settings → Chat → "Permissions for new chats" set to Ask for approval, a new Claude chat on a 1.4.224 host started with
--dangerously-skip-permissions(the QA run on openclaw rantouch …with no prompt). The composer showed no permission button and nothing in the chat said approvals were off.After (desktop):
/compactand/clear, and a/goalobjective;/model, still work.After (phone): a Claude or Codex chat on such a host now shows a read-only Host's Agent Permissions pill where the permission picker would be. Its one entry explains that the host applies its own Agent Permissions and must be updated to choose a mode per chat. The phone never asked for a stricter mode, so this only shows what the host does and doesn't block anything.
Mechanism:
agent-session.permission-modes.v1.settings.getreply always includesnativeChatPermissionMode. 1.4.224 never sends it.agentDefaultArgs) the same way that host's launch code did.chatPermissionHostVerdictinsrc/shared/agent-chat-permission-host-support.tsallows a chat only when the host grants no more access than requested. The request is this client's Settings → Chat value. A missing or unknown value counts as Ask.structured-agent-session-launch-admission.ts);sendBlockedReasonon the structured transport.Compatibility:
legacy attach-shaped permission creationinstructured-agent-session-wire-contracts.test.ts. An old client just ignores the new capability.Why
Linked Issue
Linear STA-10671. Related: STA-10426 (the 1.4.225 permission-mode PRs #26116, #26684, #28099, #28100, #28212, #28268).
Visual Proof
N/A for screenshots: the change is a refusal toast, a disabled Send with a warning line in the composer, and a read-only phone pill. They only appear against a 1.4.224 host, which can't run in this sandbox. Unit tests cover what each surface shows.
Testing
src/shared/agent-chat-permission-host-support.test.ts: what an old host runs, by its arguments; the verdict for each pair of requested and actual mode; an unreadable host refused; the capability advertised.src/renderer/src/runtime/structured-chat-host-permission.test.ts:structured-agent-session-launch-admission.test.ts: a refused or unverified paired host gets no chat, no terminal and exactly one toast; this machine is never probed.use-native-chat-structured-composer-send.test.tsx: a held host takes no message and no/compact, but/modelstill runs.pnpm tc, mobiletsc --noEmit, andpnpm run check:code-quality:changedpass.Review
Agent skill upstream boundary
Notes
settings.get.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)