fix(cursor): stop false shell blocked reports and cmd/command mismatch (#399) - #402
Merged
Wibias merged 16 commits intoJul 25, 2026
Merged
Conversation
…aders + sideband API host)
Treat shell_command/exec_command as one Codex bridge, pin it through catalog truncation, and rewrite native-exec rejection copy so policy routing is not mistaken for a sandbox denial.
Cursor advertises cmd, but Codex validates command. Normalize completed tool args against the Responses-side schema so shell_command stops failing with missing field command.
This comment was marked as resolved.
This comment was marked as resolved.
…idge-jun#399) Accept shell_command/exec_command as one advertised bridge at the client-tool gate, force-keep the bridge through byte-budget truncation, update native-exec policy assertions, and sharpen anti-false-block guidance for Cursor-native Shell.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Share one shell-bridge alias resolver and extend budget eviction so apply_patch is force-kept like the shell bridge when filler tools crowd the Cursor catalog.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
…ge-jun#399) Pin-first admission already keeps shell_command/apply_patch ahead of filler, so the recovery eviction path could never run. Remove it and assert ordinary priority-based omission instead.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
…#399) Rewrite native-exec rejection and guidance copy to route silently to the Codex shell bridge without disabled/denial wording that models echo to users.
Collaborator
Author
|
Ready |
…idge-jun#399) Keep forced shell_command/exec_command from matching namespaced remotes, and tighten native-exec denial message regressions.
…ools priority (lidge-jun#399) Make shell alias tool_choice catalog-aware, discard aliases when canonical keys are present regardless of order, and admit shell/apply_patch ahead of unrelated allowed tools under truncation.
4 tasks
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.
Summary
shell_command/exec_command/ longmcp_opencodex-responses_*aliases) plus native Shell/Read policy rejections made models invent "blocked" commentary.cmd, models sendcmd, but Codex validatescommand→missing field \command``. That made the bridge actually fail, so agents switched to Node REPL / Grep and told users shell was broken.shell_commandandexec_commandas one Codex shell bridge (aliases + guidance).apply_patchthrough Cursor catalog truncation.cmdis rewritten tocommandbefore Codex validation.shell_commandcalls succeed again (realExit code: 0output); themissing field \command`` loop stops.Test plan
bun test tests/cursor-tool-definitions.test.ts tests/cursor-protobuf-events.test.ts tests/cursor-request-builder.test.ts tests/cursor-native-exec.test.ts tests/cursor-blob.test.ts tests/cursor-arg-normalize.test.tsbun x tsc --noEmit10100from this branch; live Codex Cursor sessions no longer die onmissing field commandcursor/*model: run a simple shell command and confirm it executes without "shell access is blocked" abandonmentapply_patchSummary by CodeRabbit
shell_commandandexec_commandas a single shell-bridge tool, including Responses-compatible argument normalization (e.g.,cmd→command).