fix(cursor): silent-redirect framing for native-tool denial payloads - #2665
fix(cursor): silent-redirect framing for native-tool denial payloads#2665lidge-jun wants to merge 6 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0278fff287
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const NATIVE_FETCH_DISABLED = | ||
| "Cursor-native fetch is not executed locally. Use the Codex shell bridge tool `shell_command` (aliases: `exec_command`, `mcp_opencodex-responses_shell_command`, `mcp_opencodex-responses_exec_command`) with curl or wget."; | ||
| "Re-issue this fetch NOW through the catalog shell tool `shell_command` (aliases: `exec_command`, `mcp_opencodex-responses_shell_command`, `mcp_opencodex-responses_exec_command`) with curl or wget. Do NOT narrate this redirect or comment on tool availability — just make the bridge call."; |
There was a problem hiding this comment.
Forbid re-announcement in every redirect payload
When a native fetch is rejected, this message omits the explicit do NOT re-announce the task instruction included in the shell and general filesystem redirects; codexNativeMutationRefusal in native-exec-fs.ts omits it as well. Because duplicated task announcements are one of this change's stated failure modes, fetch and write/delete probes can still reproduce that behavior, while the new network test checks only denial vocabulary. Apply the complete silent-redirect instruction to both strings and assert the actual returned denial payloads.
AGENTS.md reference: src/AGENTS.md:L24-L26
Useful? React with 👍 / 👎.
리뷰 · 우선순위 55 / 80설명 이 풀 리퀘스트는 Cursor 네이티브 도구를 거절할 때 쓰는 글자를, 막혔다는 말이 아니라 지금 브리지로 다시 보내라는 명령으로 바꿉니다. 지금 dev의 src/adapters/cursor/native-exec-shell.ts 84-96줄 nativeShellDisabledMessage는 Route this through the Codex bridge라고 하지만, 거절 결과는 98-113줄에서 exitCode 1과 aborted true를 붙입니다. src/adapters/cursor/native-exec-fs.ts 46줄과 49-50줄, native-exec-network.ts 9-10줄은 disabled 또는 not executed locally라는 말을 씁니다. 모델이 그 말을 읽고 표면을 바꾼다고 사용자에게 말한 뒤, 같은 일을 브리지로 한 번 더 합니다. 고침은 세 표면의 글자에서 blocked, disabled, not executed, denied, 차단을 빼고 Re-issue this ... NOW와 Do NOT narrate를 넣습니다. #604의 호스트 셸 주의와 한 번만 고쳐서 다시 시도하라는 문장은 남깁니다. 같은 PR이 tool-result-normalize의 브리지 이름에 shell, local_shell, container.exec를 더합니다. gap-7이 브리지 이름만 봐서, Codex CLI가 광고하는 shell 빈 출력이 다시 설명되지 않았던 문제를 이어서 고친 것입니다. 테스트는 셸 메시지 함수와, 파일 소스에서 상수를 정규식으로 뽑는 방식입니다. 상수 따옴표가 바뀌거나 여러 줄이 되면 테스트가 빈 문자열을 비교할 수 있습니다. 네트워크 테스트는 파일 앞 15줄만 봅니다. 더 큰 한계는 프로토콜 필드입니다. 글자를 조용히 바꿔도 rejectedShellResult는 여전히 실패와 aborted입니다. 모델이 텍스트가 아니라 구조 필드를 보면 여전히 거절로 읽습니다. NOW와 Do NOT narrate가 어떤 모델에는 잔소리로 남아, 그 문장 자체를 인용할 수도 있습니다. 이 PR은 베이스가 #2662입니다. 현재 dev(7181ebd) 위에 혼자 합칠 수 없습니다. 라이브 QA 표는 S4가 한 번 실패하고, 빈 결과 이름 확장 뒤에 통과했다고 적습니다. S2b는 주석이 두 번 나오는 잔여가 있습니다. 프롬프트 문장만으로 탐색을 없애는 일은 스택 전체가 같은 방향을 유지해야 효과가 있습니다. src/adapters/cursor/native-exec-shell.ts:85 - 거절 글자에 막힘 표현이 남아 모델이 표면 전환을 말로 설명합니다. 메인테이너의 판단이 필요한 지점
너의 추천 #2650-#2662 스택이 먼저 들어간 뒤에 이 PR을 마지막에 합치세요. 지금 dev에 직접 합치지 마세요. 합치기 전에는 거절 결과의 aborted 필드가 모델에 어떻게 보이는지 확인하고, 소스 파일을 읽는 테스트는 상수 export로 바꾸세요. 미리보기 배포는 계획에 없습니다. 이 댓글은 grok-bot이 작성했습니다 |
65e8fe0 to
f3624c2
Compare
1f2ad63 to
a475dc1
Compare
f3624c2 to
ddecc67
Compare
a475dc1 to
187dec5
Compare
Summary
nativeShellDisabledMessage), filesystem read/ls/grep + write/delete refusals, and fetch. New framing states the exact bridge action to take NOW, keeps the [Bug] Cursor Auto repeats tool continuations on Windows PowerShell 5.1, causing excessive token usage #604 host-shell adaptation guidance, and explicitly forbids narrating the redirect, commenting on tool availability, or re-announcing the task. No denial-framing vocabulary remains ("blocked/disabled/not executed/denied/차단").Stacked on #2662 (codex/cursor-gap-7).
Verification
bun test tests/cursor-silent-redirect.test.ts— 3 pass (forbidden-vocabulary regex over all three denial surfaces + narration prohibition present).bun test tests/cursor-native-exec.test.ts tests/cursor-blob.test.ts tests/cursor-tool-definitions.test.ts— 128 pass 0 fail total.bun x tsc --noEmit— clean.codex execadversarial QA against the restarted local proxy (transcripts recorded in devlog/_plan/260826_cursor_responses_gap).Checklist