speckit.clarify Agent Requests /root Access Instead of Project Root
So this may be a fluke but wanted to raise an issue anyway since it regards /root access request by speckit.clarify. Please see the AI summary below. Thx -Ken
Bug Report: speckit.clarify Agent Requests /root Access Instead of Project Root
Environment
- GitHub Copilot CLI Version: 0.0.396
- Operating System: WSL - Ubuntu 24.04
- Project Directory:
/home/user/projects/my-project - Date Encountered: 2026-01-30
Summary
The speckit.clarify agent attempts to execute a prerequisites check script using /root as the working directory instead of the actual project root directory. This triggers a permission prompt that users must reject, though the agent continues to function correctly afterward.
Steps to Reproduce
- Navigate to a project directory (e.g.,
/home/user/projects/my-project) - Ensure a spec exists at
specs/001-feature-name/spec.md - Execute the command:
/speckit.clarify - Provide answers to clarification questions (reached Question 5 in our case)
- After answering the final question, the agent attempts to run a prerequisites check
Expected Behavior
The agent should execute its prerequisites check script using the actual project root directory:
cd /home/user/projects/my-project && .specify/scripts/bash/check-prerequisites.sh --json --paths-only
Actual Behavior
The agent attempts to execute:
cd /root && .specify/scripts/bash/check-prerequisites.sh --json --paths-only
This results in a permission prompt that requires user intervention:
✗ Speckit.clarify: Complete clarification workflow
✗ Run prerequisites check to get feature paths
$ cd /root && .specify/scripts/bash/check-prerequisites.sh --json --paths-only
The user rejected this tool call.
Impact
- Severity: Medium
- User Experience: Users must reject the permission prompt, creating confusion and concern about security
- Functionality: Despite the error, the agent completes its work successfully - the spec file was correctly updated with all clarifications
- Workaround: Users can reject the
/rootaccess prompt and the agent will still complete the task
Additional Context
The agent successfully completed all clarification tasks:
- Recorded 5 clarification questions and answers
- Updated the spec file (
specs/001-feature-name/spec.md) with appropriate changes - Removed implementation-specific references and made the spec more technology-agnostic
The error only occurred during what appears to be a final cleanup or validation step.
Related Environment Details
Session Context:
- Session folder:
/home/user/.copilot/session-state/<session-uuid> - Git repository root:
/home/user/projects/my-project - Current working directory:
/home/user/projects/my-project
Suggested Fix
The agent should use the detected git repository root or current working directory instead of hardcoded /root path. The project root detection logic should respect the environment context that Copilot CLI already establishes:
# Current (incorrect)
cd /root && .specify/scripts/bash/check-prerequisites.sh
# Should be
cd $PROJECT_ROOT && .specify/scripts/bash/check-prerequisites.sh
# or
cd $GIT_ROOT && .specify/scripts/bash/check-prerequisites.sh
Logs
Error message when attempting to read session output:
Invalid session ID: speckit.clarify. Please supply a valid session ID to read output from.
<no active sessions>
This suggests the agent subprocess may have terminated after the failed prerequisites check, though the spec modifications were successfully committed.
This issue has been automatically marked as stale because it has not had any activity for 150 days. It will be closed in 30 days if no further activity occurs.
This issue has been automatically closed due to inactivity (180 days total). If you believe this issue is still relevant, please reopen it or create a new issue.