fix(ce-sessions): emit repo root path instead of basename subshell#873
Merged
tmchow merged 1 commit intoMay 27, 2026
Conversation
The pre-resolved repo-name line wrapped a command substitution in double quotes (`basename "$(git rev-parse --show-toplevel)"`), which Claude Code's permission check rejects as an unanalyzable `string` node. That failed the SKILL.md preamble render and broke every /ce-sessions invocation (and /ce-compound with session history). Emit the raw repo root via a single `git rev-parse --show-toplevel` — the same single-command shape the working branch line already uses — and have the agent take the last path component for the repo folder name. Closes #867
Merged
LLMpsycho
pushed a commit
to LLMpsycho/compound-engineering-plugin
that referenced
this pull request
May 28, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this fix, running
/ce-sessions(or/ce-compoundwith session history enabled) failed immediately: Claude Code's permission check rejected the skill's pre-resolved repo-name line and the SKILL.md preamble never rendered.The cause was
basename "$(git rev-parse --show-toplevel)"— wrapping a command substitution in double quotes produces astringnode the permission checker can't statically analyze (issue #709, the class this repo's ownAGENTS.mddocuments as forbidden). The fix emits the raw repo root via a singlegit rev-parse --show-toplevel(the same single-command shape the working branch line above it already uses) and has the agent take the last path component for the repo folder name.Note for reviewers:
tests/skill-shell-safety.test.tsdid not catch this. Its detector flags a double-quote inside the$()(basename "$(dirname "$common")") but not a double-quote wrapping the$()(basename "$(...)"). Broadening it would also flag thecat "$(git rev-parse --show-toplevel)/..."config-read patternAGENTS.mddocuments as safe, so this PR leaves the detector alone — the coverage gap is noted but not closed here.Closes #867