claude adapter: let a workspace's .claude/settings.json widen headless --allowedTools - #1317
Conversation
…s --allowedTools Claude Code `-p` decides the non-safe Bash surface from the `--allowedTools` flag alone; it does not read project settings files for that gate (verified against 2.1.258 -- permissions.allow in .claude/settings.json, the same key in an inline --settings blob, and --setting-sources user,project,local were all ignored, while a rule in the CLI flag worked). So a scheduled headless run in a workspace whose Issue needs a project-specific command (e.g. a committed wrapper script, `git push`, `alice-workspace inbox push`) hit an auto-denied approval prompt with nobody to answer it, and the run failed silently. composeHeadlessCommand now reads `<cwd>/.claude/settings.json` `permissions.allow` and appends its `Bash(...)` / `mcp__*` entries to the locked four-shim list. A workspace opts in by committing that file; workspaces that ship none are unchanged. Malformed / missing file -> default untouched. `sandbox` is intentionally not forwarded -- that is a separate knob. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YQRgbzfqMNh99YJFXEUJ7c
|
Someone is attempting to deploy a commit to the luokerenx4's Team Team on Vercel. A member of the Team first needs to authorize it. |
|
Gentle nudge — this one is small (1 source file + tests) and unblocks a real operational failure. What breaks without it: a scheduled/headless harness run ( Fix: Verified end-to-end in production: with the workspace file in place, previously-blocked scheduled paper-trading bots ( CI hasn't run — looks like it needs a maintainer to approve the workflow for this fork PR (the only check showing is an unrelated Vercel deploy-preview auth failure). |
Claude Code
-pgates non-safe Bash on the--allowedToolsflag only — it does not read project settings files for that decision (verified 2.1.258). So a scheduled headless run whose Issue needs a project-specific command (a committed wrapper,git push,alice-workspace inbox push) hits an auto-denied approval prompt with nobody to answer it, and fails silently.composeHeadlessCommandnow reads<cwd>/.claude/settings.jsonpermissions.allowand appends itsBash(...)/mcp__*entries to the locked four-shim list. Opt-in per workspace by committing that file; workspaces that ship none are unchanged.sandboxis intentionally not forwarded.Tests:
ai-config.spec.tsgains merge + malformed-file cases;tscclean, 107 pass.Suggested labels: workflow:parallel, theme:safety, area:settings, area:workspace, review:deep.
🤖 Generated with Claude Code