Keep Claude reviews noninteractive and read-only

This commit is contained in:
2026-09-22 10:52:38 -04:00
parent 883c985707
commit 26f812ac07
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ The approver's shell permission permits only the installed
Claude approval evidence, an exact-head Gitea approval by `review_agent`,
the `dev` target, a mergeable PR, and passing configured checks before it
requests a squash merge. `scripts/nq-review` launches the independent
Claude review in the task worktree, checks the head again afterward, saves
Claude review in a noninteractive read-only session in the task worktree,
checks the head again afterward, saves
the output under `/tmp/opencode`, and posts the Gitea approval.
The approver verifies the reviewed head again before a merge.
+2 -1
View File
@@ -71,7 +71,8 @@ def main() -> int:
)
result = subprocess.run(
[CLAUDE, "-p", prompt, "--model", "claude-sonnet-5", "--effort", "high",
"--permission-mode", "plan", "--allowedTools", "Read", "Grep", "Glob",
"--permission-mode", "dontAsk", "--disallowedTools", "Edit", "Write",
"NotebookEdit", "--allowedTools", "Read", "Grep", "Glob",
"Bash(git diff:*)", "Bash(git log:*)", "Bash(git show:*)", "Bash(git status:*)"],
cwd=args.worktree, text=True, capture_output=True, timeout=1200,
)