Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ adapter_argv() {
grok-cli)
# Read allowed (in-tree context); deny writes / shell / subagents / web / MCP.
# Schema forces non-streaming json on grok — keep hard-only (no PEERLOG idle).
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --model "$(route_model grok-cli)" --effort high \
# --verbatim: without it grok offloads a large prompt to a session file and
# sends only a preview, spending scarce turns to re-read what it was given.
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --verbatim --model "$(route_model grok-cli)" --effort high \
--cwd "$PEER_WORKDIR" --permission-mode dontAsk
[ -z "${LARGE_DIFF_CONTEXT_DIR:-}" ] || printf '%s\0' --allow "Read($LARGE_DIFF_CONTEXT_DIR/**)"
printf '%s\0' --deny Edit --deny Write --deny Bash --deny Task --deny 'mcp__*' \
Expand Down
4 changes: 3 additions & 1 deletion skills/ce-doc-review/scripts/cross-model-doc-review.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ adapter_argv() {
;;
grok-cli)
# Schema forces buffered json — hard-only, no PEERLOG idle (#1270).
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --model "$(route_model grok-cli)" --effort high \
# --verbatim: without it grok offloads a large prompt to a session file and
# sends only a preview — unrecoverable here, because Read is denied below.
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --verbatim --model "$(route_model grok-cli)" --effort high \
--cwd "$PEER_WORKDIR" --permission-mode dontAsk \
--deny Read --deny Edit --deny Write --deny Bash --deny Task --deny 'mcp__*' \
--disable-web-search --no-subagents --max-turns 15 \
Expand Down
4 changes: 3 additions & 1 deletion skills/ce-pov/scripts/cross-model-pov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ adapter_argv() {
;;
grok-cli)
# Schema forces buffered json — hard-only, no PEERLOG idle (#1270).
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --model "$(route_model grok-cli)" --effort high \
# --verbatim: without it grok offloads a large prompt to a session file and
# sends only a preview, spending scarce turns to re-read what it was given.
printf '%s\0' grok --prompt-file "$PROMPT_FILE" --verbatim --model "$(route_model grok-cli)" --effort high \
--cwd "$READ_ROOT" --permission-mode dontAsk \
--deny Edit --deny Write --deny Bash --deny Task --deny 'mcp__*' \
--no-subagents --max-turns 15 \
Expand Down
3 changes: 3 additions & 0 deletions tests/skills/ce-code-review-cross-model-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,9 @@ printf '%s' '{"structured_output":{"reviewer":"adversarial","findings":[],"resid
expect(cmd).toContain("--deny Edit")
expect(cmd).toContain("--deny Write")
expect(cmd).toContain("--deny Bash")
// Without --verbatim grok offloads a large prompt to a session file and
// sends only a preview, so the peer reviews a diff it never received.
expect(cmd).toContain("--verbatim")
expect(cmd).toContain("--disable-web-search")
expect(cmd).toContain("--no-subagents")
expect(cmd).toContain("--permission-mode dontAsk")
Expand Down
3 changes: 3 additions & 0 deletions tests/skills/ce-doc-review-cross-model-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ printf '%s' '{"structured_output":{"reviewer":"adversarial","findings":[],"resid
test("grok CLI: deny Read + web/subagents off + dontAsk + effort high", () => {
const cmd = emitAdapter("grok-cli")
expect(cmd).toContain("--deny Read")
// Load-bearing with --deny Read: without --verbatim grok offloads a large
// prompt to a session file the peer is then forbidden to read back.
expect(cmd).toContain("--verbatim")
expect(cmd).toContain("--disable-web-search")
expect(cmd).toContain("--no-subagents")
expect(cmd).toContain("--permission-mode dontAsk")
Expand Down
3 changes: 3 additions & 0 deletions tests/skills/ce-pov-cross-model-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ describe("ce-pov cross-model route safety", () => {
expect(emit("grok-cli")).toContain("--deny Edit")
expect(emit("grok-cli")).toContain("--deny Write")
expect(emit("grok-cli")).toContain("--deny Bash")
// Without --verbatim grok offloads a large prompt to a session file and
// sends only a preview, so the peer answers on context it never received.
expect(emit("grok-cli")).toContain("--verbatim")
expect(emit("grok-cli")).toContain("--output-format json")
expect(emit("grok-cli")).not.toContain("stream-json")
for (const route of ["grok-cursor", "cursor", "composer"]) {
Expand Down