Skip to content

fix(ce-sessions): emit repo root path instead of basename subshell#873

Merged
tmchow merged 1 commit into
mainfrom
tmchow/https-github.com-EveryInc-compound-engineering-plugin-issues-867
May 27, 2026
Merged

fix(ce-sessions): emit repo root path instead of basename subshell#873
tmchow merged 1 commit into
mainfrom
tmchow/https-github.com-EveryInc-compound-engineering-plugin-issues-867

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 27, 2026

Before this fix, running /ce-sessions (or /ce-compound with 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 a string node the permission checker can't statically analyze (issue #709, the class this repo's own AGENTS.md documents as forbidden). The fix emits the raw repo root via a single git 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.ts did 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 the cat "$(git rev-parse --show-toplevel)/..." config-read pattern AGENTS.md documents as safe, so this PR leaves the detector alone — the coverage gap is noted but not closed here.

Closes #867


Compound Engineering
Claude Code

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
@tmchow tmchow merged commit 253dba8 into main May 27, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 27, 2026
LLMpsycho pushed a commit to LLMpsycho/compound-engineering-plugin that referenced this pull request May 28, 2026
@duythanh4776-arch
Copy link
Copy Markdown

@cavanaug

@duythanh4776-arch duythanh4776-arch mentioned this pull request May 30, 2026
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.

ce-sessions: nested $(…) in pre-resolved repo-name command blocked by Claude Code permission system

2 participants