Skip to content

Stop Slack notify step from loading project config#998

Merged
danbarr merged 1 commit into
mainfrom
fix-slack-notify-setting-sources
Jun 30, 2026
Merged

Stop Slack notify step from loading project config#998
danbarr merged 1 commit into
mainfrom
fix-slack-notify-setting-sources

Conversation

@danbarr

@danbarr danbarr commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #997. The allowedTools fix in #997 is confirmed working ("allowedTools": ["Bash(gh:*)", "Write"] parses correctly now), but permission denials are still high: 19 denials on a run that succeeded (29/30 turns), 21 and 24 on two that hit the max-turns cap.

I couldn't get a full per-turn transcript to confirm definitively. gh run rerun --debug only adds the GitHub Actions runner's own ##[debug] lines; claude-code-action's "Run Claude Code Action" composite step defines its own explicit env: block in action.yml, which doesn't forward ACTIONS_STEP_DEBUG into the Bun subprocess, so show_full_output never actually flips on that way.

The strongest remaining lead: settingSources defaults to ["user", "project", "local"]. The checkout step added in #996 (needed for claude-code-action's restoreConfigFromBase) means this repo's CLAUDE.md and .claude/ (agents, commands, skills) are now present in the working directory and get loaded as project context. None of that is relevant to this step, whose only job is to read one PR via gh pr view and write a JSON file, and the action's own docs call out --setting-sources user as the documented way to avoid pulling in unrelated in-repo config. Scoping this step to user-level settings only should stop Claude from wandering into tool calls the allowlist denies.

This isn't a fully confirmed fix since I couldn't capture the transcript, so worth watching the next real ready_for_review trigger to see if denials drop.

Type of change

  • Bug fix (typo, broken link, etc.)

Related issues/PRs

Follow-up to #994, #995, #996, #997

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

Reviewer checklist

Content

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

claude-code-action defaults to settingSources user+project+local,
so the checkout step (added for restoreConfigFromBase) pulls this
repo's CLAUDE.md and .claude/ into context. That config describes
unrelated doc-review workflows the tool allowlist denies, which
likely explains the persistent permission denials even after the
allowedTools fix. Scope this step to user settings only.
Copilot AI review requested due to automatic review settings June 30, 2026 20:57
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-website Ready Ready Preview, Comment Jun 30, 2026 8:58pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR scopes the Slack notify workflow’s Claude Code step to user-level settings only, to prevent it from loading in-repo Claude configuration (CLAUDE.md / .claude/) that can cause unnecessary tool attempts and permission denials. It aligns the workflow with the action’s documented approach for avoiding unrelated project config when the step’s job is narrowly to summarize gh pr view output into a JSON file.

Changes:

  • Add --setting-sources user to the claude_args for the “Compose reviewer summary” step.
  • Document (in inline comments) why project/local setting sources are intentionally excluded for this step.

@danbarr danbarr merged commit 9b7f0db into main Jun 30, 2026
4 checks passed
@danbarr danbarr deleted the fix-slack-notify-setting-sources branch June 30, 2026 21:00
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.

3 participants