Skip to content

Allow attaching repositories to cloud sessions without a prompt - #59

Merged
d-morrison merged 1 commit into
mainfrom
claude/sharp-edison-8dmpzj
Oct 27, 2026
Merged

d-morrison merged 1 commit into
mainfrom
claude/sharp-edison-8dmpzj

Conversation

@d-morrison

Copy link
Copy Markdown
Contributor

Why

Cloud sessions working in psc often need to attach a sibling repository: ai-config for lab-rule updates, or psw or gha. In one session, the auto-mode permission check denied mcp__claude-code-remote__add_repo twice and blocked a finished ai-config change. The attach succeeded on the third try, after the maintainer asked for it explicitly. The maintainer asked for this allow rule so later sessions don't stall the same way.

Note: the commit message says the call was denied "even after the maintainer asked for it directly". That's wrong. It succeeded once the maintainer asked directly; this description is the accurate account. Please use this description as the squash-merge message.

What

Adds "mcp__claude-code-remote__add_repo" to permissions.allow in .claude/settings.json. This only lets a session attach a repository. Pushing, opening PRs, and merging in that repository still go through their own checks.

Verification

  • .claude/settings.json still parses as valid JSON.
  • The diff is that one entry.

Generated by Claude Code

Cloud sessions working in psc often need a sibling repo (ai-config for
lab-rule updates, psw, gha). The auto-mode classifier denied
mcp__claude-code-remote__add_repo twice in one session, even after the
maintainer asked for it directly, blocking a ready ai-config change.
The maintainer asked for this allow rule. It only attaches a repository
to the session; pushes and PRs there still go through their own checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VDkNzpZcNucEgL2PYawxJV
@github-actions

Copy link
Copy Markdown
Contributor

Claude finished review — View run


All relevant CI checks are passing (spellcheck, link-checker, lint, DOIs, chars); the build and this review job are still pending/running, which is expected since this is the review itself.

This is a minimal, one-line change to .claude/settings.json, so I verified it directly rather than treating it as self-evidently trivial.

What I checked

  • .claude/settings.json is still valid JSON after the change (python3 -m json parse succeeded), and the new entry is placed in the allow array, not deny — correct array.
  • mcp__claude-code-remote__add_repo is a real tool name, not a hallucination: it's referenced throughout the Morrison-Lab/ai-config memory corpus (memories/github-mcp-tools.md, memories/delegation.md, memories/github-remote-sessions.md, shared/workflow/default-to-action-grants.md), consistent with the mcp__<server>__<tool> naming convention used by other already-allowlisted tools.
  • The failure mode described in the PR body — an approval-gated MCP tool call failing repeatedly in auto mode with no human present to approve it, then succeeding once a person intervenes directly — matches a documented incident in ai-config's memories/github-mcp-tools.md ("add_repo ... can fail repeatedly and silently under auto-mode ... Retrying the same call in auto mode doesn't help"). Adding an allow entry removes the need for the approval dialog in the first place, which is a sound fix for that failure mode.
  • One nuance worth flagging for awareness, not a blocker: ai-config's shared/workflow/use-existing-pr-branch.md documents a separate "auto-mode classifier" layer (soft_deny/hard_deny, with labels like "Permission Grant" or "Self-Modification") that is independent of ordinary permissions.allow/ask/deny resolution, and explicitly states that classifier "ignores autoMode in a repository's .claude/settings.json... so committing it to a repository does nothing" — only ~/.claude/settings.json or managed settings work there. The denial text in the PR's account (no classifier label mentioned, resolved by a person simply approving) lines up with the ordinary ask-dialog path documented in github-mcp-tools.md, not that classifier path, so this fix should work for the incident described. If a future denial instead carries one of those classifier labels, this permissions.allow entry won't help and the fix belongs in ~/.claude/settings.json or managed settings instead.
  • Per ai-config's own permission-check skill, .claude/settings.json (project-shared, checked in) is a legitimate, documented layer for ordinary permissions.allow rules — this is the same file and array that already carries entries like Bash(gh run list:*), so the change is consistent with the existing pattern, and use-existing-pr-branch.md explicitly says editing a repo's .claude/settings.json is already a standing, pre-authorized action for these sessions.
  • The PR description's self-correction (flagging that the commit message's "even after the maintainer asked for it directly" is wrong, and that the description's account — succeeded once asked directly — is the accurate one, asking the maintainer to use the description as the squash-merge message) is itself accurate: I compared the actual commit message via gh pr view --json commits against the PR description and confirmed the discrepancy is real and the description's correction is the right one.
  • Scope is tight (one file, one line), matching "Keep PRs scoped." No _site//_freeze/ changes, no new dependencies, no prose/R/Quarto touched, so the rest of the CLAUDE.md checklist (bullet-list rule, code-fold defaults, lintr, bibliography, build hygiene) doesn't apply here.
  • All CI checks that have completed are green (spellcheck, link-checker, lint, DOIs, chars, CodeQL); build and this review job are still pending, as expected.

No blocking issues found.

Verdict

Ready for merge

Structured Review Data (JSON)
{
  "schema_version": "1.1",
  "reviewer": "claude",
  "commit_sha": "e92e929a103242ffc5ffab5a546b42f02750b4a2",
  "verdict": "CLEAN",
  "findings": [],
  "detailed_assessment": "The single-line addition to .claude/settings.json permissions.allow is valid JSON, correctly placed, and the mcp__claude-code-remote__add_repo tool name is verified against the ai-config memory corpus rather than invented.",
  "holistic_assessment": "Scope stays narrow to one permissions entry, matches the documented ask-dialog auto-mode failure pattern, and the PR's own squash-message correction was independently verified against the actual commit text."
}

Reviewed commit: e92e929

@github-actions

Copy link
Copy Markdown
Contributor

💰 Cost: $0.6167 (review) — run

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.

2026-10-27 23:57 UTC

Copy link
Copy Markdown
Contributor Author

Cross-model review waived: no non-Claude reviewer could run from this session. The reasons were measured earlier today on Morrison-Lab/psc#58:

  • OpenCode Go: the proxy rejected the CONNECT to opencode.ai:443 with 403.
  • OpenRouter: no connection.
  • Reviewer CLIs: none of opencode, codex or agy is installed.

This merge relies on the following, all on head e92e929:

  • the Claude review, which is clean;
  • every check run, all of which passed;
  • check-pr-fully-clean.py, which reports FULLY CLEAN;
  • the base, which is current (0 commits behind main).

This PR changes only .claude/settings.json. It is being merged under the maintainer's session merge grant.


Posted by Claude Code (AI agent) --- not written by a human.


Generated by Claude Code

@d-morrison
d-morrison merged commit 585e1a1 into main Oct 27, 2026
17 checks passed
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.

2 participants