Tool calls relayed from a cloud agent are judged strictly: your hooks skip and relaxed permission modes are downgraded.
What's wrong with this entry?
When a cloud agent relays a tool call to your local Claude Code, the request is now marked as remote execution and evaluated more strictly. Your hooks do not run, and a locally relaxed permission mode is not inherited: acceptEdits and bypassPermissions are rewritten to default before the permission check.
- The marker is new in this build; nothing in 2.1.238 sets or reads it.
- Hooks return immediately for these calls, so a PreToolUse hook cannot approve or block a relayed tool.
- Bash sandbox auto-allow is skipped, along with several local shortcuts that would otherwise allow a command based on its prefix or leading environment assignments.
- No separate flag guards the downgrade; it applies whenever a remote agent relays a request.
forRemoteExecution
Strings lifted out of the shipped bundle, so the claim above can be checked against them.