Skip to content

Update Grok review mechanics - #6

Closed
kelchm wants to merge 1 commit into
masterfrom
t3code/update-grok-review-mechanics
Closed

Update Grok review mechanics#6
kelchm wants to merge 1 commit into
masterfrom
t3code/update-grok-review-mechanics

Conversation

@kelchm

@kelchm kelchm commented Aug 3, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replace the plan-mode agentic review recipe with a throwaway-worktree recipe using approvals.
  • Add a separate plan-mode recipe for pure single-generation reviews with all inputs embedded.
  • Document the observed prompt-size ceiling, cancellation/truncation signatures, and shared output cap.
  • Record the verified -w / --worktree semantics from Grok 0.2.103.

Why

FanaBridge review sessions on 2026-08-02 reproduced plan-mode cancellation at turn 1–2 whenever Grok attempted a tool call, including read-only commands such as git diff. A 140 KB prompt was also silently truncated, while 119 KB worked. Long outputs continue to cancel mid-generation.

Impact

Future sessions have distinct safe recipes for tool-using reviews and tool-free generation, plus recognizable failure signatures and conservative input/output limits.

Validation

  • Confirmed -w and --worktree-ref behavior with grok 0.2.103 --help.
  • Ran git diff --check.
  • Confirmed the tracked source matches the rendered ~/.claude/CLAUDE.md.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2cac7fe2-07cc-4c12-9afc-d81587dc3266

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread dot_claude/CLAUDE.md
grok --no-auto-update --prompt-file PROMPT.md -m grok-4.5 --output-format json \
--permission-mode plan
```
- Embed every needed diff/file in `PROMPT.md`, keep the total prompt under ~100 KB to leave margin below the observed input ceiling, and explicitly tell grok that it has no tool access and must answer in one response. In field tests, 119 KB worked while 140 KB was silently truncated.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there has to be a better pattern than this -- further testing needed.

@kelchm

kelchm commented Aug 9, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #7.

The two central claims here don't survive testing, and both trace to experiments run inside /tmp:

  • "--sandbox does not prevent edits to the working directory" — grok's read-only profile leaves /tmp, /var/tmp, /var/folders and ~/.grok writable by design. sandbox-events.jsonl shows the original runs used /private/tmp/.../scratchpad/. Outside those paths the sandbox blocks the edit tool, shell writes, and new-file creation at the OS level.
  • "-w gives effective read-only protection for the real checkout"-w is silently ignored in headless mode. No worktree is created, edits land in the real checkout, and nothing is printed to stderr. With --always-approve that recipe is more dangerous than the one it replaced.

Also: the 119–140 KB input ceiling doesn't reproduce (151 KB and 204 KB read in full), and grok does ship a headless /review skill.

#7 rebuilds the guidance on --deny rules (which fail closed) and plain git worktree, and adds a grok-implementation skill.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant