Conversation
- Remove -s flag (causes exit code 1) - Fix sandbox: cd to repo root instead of nonexistent --cwd flag - Fix --allow-tool format: no spaces (write,read) - Update model: claude-sonnet-4-5 for real tasks, haiku for pings - Add --cwd to all Claude CLI invocation patterns - Fix orchestration detection command: remove -s, add cd to root - Bump version to 0.5.6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📝 WalkthroughWalkthroughUpdated plugin version from 0.5.5 to 0.5.6 and revised CLI documentation for Claude and Copilot invocations. Changes include removing the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@skills/agents/claude-cli/SKILL.md`:
- Around line 97-103: The "Write delegation + shell (runs commands)" example's
--allowedTools list currently grants "Read" "Edit" and "Bash(git *)" only, which
omits the Write permission needed for file creation flows; update the example
command (the block titled "Write delegation + shell (runs commands)") to include
"Write" in the --allowedTools list (e.g., --allowedTools "Read" "Write" "Edit"
"Bash(git *)") so the delegation actually allows creating new files.
- Line 147: The "Working directory" table row in SKILL.md incorrectly states
Copilot CLI supports `--cwd PATH`; update that row so the Copilot column
indicates it has no `--cwd` flag and show the proper usage: change directory
before invoking (e.g., `cd /path/to/repo && copilot -p "prompt"`). Locate the
table row containing the "Working directory" label and replace the Copilot cell
content (`--cwd PATH`) with a short note like "no --cwd; cd to repo then run
copilot (e.g., cd /path && copilot -p 'prompt')", leaving the other tool's
(`--cwd PATH`) cell unchanged.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 48957b55-f961-4124-a2f9-b0f334cbec5f
📒 Files selected for processing (5)
.claude-plugin/plugin.jsonCHANGELOG.mdskills/agents/claude-cli/SKILL.mdskills/agents/copilot-cli/SKILL.mdskills/orchestration/SKILL.md
| **Write delegation + shell (runs commands):** | ||
| ```bash | ||
| claude -p "[delegation prompt]" --output-format text \ | ||
| --cwd $(git rev-parse --show-toplevel) \ | ||
| --allowedTools "Read" "Edit" "Bash(git *)" \ | ||
| --no-session-persistence | ||
| ``` |
There was a problem hiding this comment.
“Write delegation + shell” example is missing Write permission.
The command title says write delegation, but the flags only grant "Read" "Edit" "Bash(git *)". This can block file creation flows.
Suggested patch
claude -p "[delegation prompt]" --output-format text \
--cwd $(git rev-parse --show-toplevel) \
- --allowedTools "Read" "Edit" "Bash(git *)" \
+ --allowedTools "Read" "Edit" "Write" "Bash(git *)" \
--no-session-persistence🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agents/claude-cli/SKILL.md` around lines 97 - 103, The "Write
delegation + shell (runs commands)" example's --allowedTools list currently
grants "Read" "Edit" and "Bash(git *)" only, which omits the Write permission
needed for file creation flows; update the example command (the block titled
"Write delegation + shell (runs commands)") to include "Write" in the
--allowedTools list (e.g., --allowedTools "Read" "Write" "Edit" "Bash(git *)")
so the delegation actually allows creating new files.
| | Tool permissions | `--allow-tool='write, read'` | `--allowedTools "Read" "Edit"` | | ||
| | Silence | `-s` | `--output-format text` | | ||
| | Prevent questions | `--no-ask-user` | implied by `-p` | | ||
| | Working directory | `--cwd PATH` | `--cwd PATH` | |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
Does GitHub Copilot CLI currently provide a --cwdflag forcopilot -p? If not, what is the recommended way to ensure repo-root file access in scripted invocations?
💡 Result:
No, GitHub Copilot CLI does not currently provide a --cwd flag for copilot -p. An open feature request exists for this (Issue #457, opened Nov 2025). The CLI uses the current working directory where it is invoked for initial context and file access. Recommended way for scripted invocations to ensure repo-root file access: Change to the repo root directory before running copilot -p, using shell constructs like: (cd /path/to/repo && copilot -p "your prompt") or pushd /path/to/repo && copilot -p "your prompt" && popd Official docs emphasize navigating to the folder containing code first. For additional directories, use --add-dir (mentioned in French docs), but primary access is from the invocation directory. In interactive mode, /cwd or /add-dir can expand access, but for non-interactive -p, pre-change directory.
Citations:
- 1: Allow users to set the current working directory via command line flag github/copilot-cli#457
- 2: https://docs.github.com/copilot/how-tos/use-copilot-agents/use-copilot-cli
- 3: https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli
- 4: https://docs.github.com/fr/copilot/reference/copilot-cli-reference/cli-programmatic-reference
🏁 Script executed:
# First, let's look at the file structure
find . -name "SKILL.md" -path "*/claude-cli/*" | head -5Repository: namos2502/CortexLink
Length of output: 99
🏁 Script executed:
# Read the SKILL.md file with context around line 147
if [ -f "skills/agents/claude-cli/SKILL.md" ]; then
wc -l "skills/agents/claude-cli/SKILL.md"
fiRepository: namos2502/CortexLink
Length of output: 101
🏁 Script executed:
# Get content around line 147 with broader context
if [ -f "skills/agents/claude-cli/SKILL.md" ]; then
sed -n '130,165p' "skills/agents/claude-cli/SKILL.md"
fiRepository: namos2502/CortexLink
Length of output: 1258
🏁 Script executed:
# Search for mentions of Copilot and working directory or cwd in the SKILL.md file
rg -i "copilot|working directory|--cwd" "skills/agents/claude-cli/SKILL.md" -nRepository: namos2502/CortexLink
Length of output: 819
🏁 Script executed:
# Read the entire file to check for other context about Copilot's approach
cat -n "skills/agents/claude-cli/SKILL.md"Repository: namos2502/CortexLink
Length of output: 7009
The comparison table incorrectly documents Copilot CLI's working directory handling.
Copilot CLI does not provide a --cwd flag. According to GitHub's documentation and an open feature request (Issue #457), the correct approach for Copilot is to change directory before invoking: cd /path/to/repo && copilot -p "prompt". This contradicts line 147, which claims both tools use --cwd PATH.
Update the "Working directory" row:
Suggested patch
-| Working directory | `--cwd PATH` | `--cwd PATH` |
+| Working directory | `cd "$(git rev-parse --show-toplevel)" && ...` | `--cwd PATH` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Working directory | `--cwd PATH` | `--cwd PATH` | | |
| | Working directory | `cd "$(git rev-parse --show-toplevel)" && ...` | `--cwd PATH` | |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@skills/agents/claude-cli/SKILL.md` at line 147, The "Working directory" table
row in SKILL.md incorrectly states Copilot CLI supports `--cwd PATH`; update
that row so the Copilot column indicates it has no `--cwd` flag and show the
proper usage: change directory before invoking (e.g., `cd /path/to/repo &&
copilot -p "prompt"`). Locate the table row containing the "Working directory"
label and replace the Copilot cell content (`--cwd PATH`) with a short note like
"no --cwd; cd to repo then run copilot (e.g., cd /path && copilot -p 'prompt')",
leaving the other tool's (`--cwd PATH`) cell unchanged.
This pull request focuses on fixing sandboxing and invocation issues for both Copilot CLI and Claude CLI agents, ensuring reliable programmatic use and accurate documentation. The main improvements are the removal of unsupported flags, enforcing correct working directory usage, updating invocation patterns, and clarifying documentation for reproducible agent behavior.
Copilot CLI fixes and documentation updates:
-sflag from all Copilot CLI invocation examples and documentation, as it causes exit code 1 and is not valid for programmatic use.--cwdflag; all invocations now requirecdto the repository root to ensure proper file access, with updated documentation and code examples.Claude CLI fixes and documentation updates:
--cwd $(git rev-parse --show-toplevel)to all Claude CLI invocation patterns and documentation to address the same sandboxing restriction as Copilot CLI.--allowedTools "Read" "Edit") and clarified model usage.General improvements:
0.5.6and added a detailed changelog entry summarizing all fixes and improvements.These changes ensure that both Copilot CLI and Claude CLI agents can be reliably invoked from any directory, with correct flags and model selection, and that all documentation accurately reflects these best practices.
Summary by CodeRabbit
Documentation
Chores