fix(plugin): invoke hook via bash to avoid +x permission requirement#245
Merged
darrenhinde merged 8 commits intomainfrom Feb 23, 2026
Merged
fix(plugin): invoke hook via bash to avoid +x permission requirement#245darrenhinde merged 8 commits intomainfrom
darrenhinde merged 8 commits intomainfrom
Conversation
- Update .context-manifest.json to include profile and detailed source information. - Revise context-scout.md to clarify context root discovery and navigation. - Modify commands to replace deprecated skills with updated ones (brainstorming → approach, systematic-debugging → debugger). - Streamline install-context.md for clarity and remove interactive profile selection. - Improve oac-status.md to provide a more comprehensive status report. - Add OAC system paths to session-start.sh for better context management. - Remove obsolete skills and improve documentation for existing commands.
- Fix double-escaped skill catalogue: use $'\n' real newlines instead of literal \n strings so escape_for_json encodes them correctly as \n in JSON - Fix OAC_SYSTEM_PATHS embedded raw into JSON string: build with real newlines and pass through escape_for_json before interpolation - Remove SessionStart matcher so hook fires on every session start unconditionally (startup, resume, clear, compact and any future types) - Remove redundant async:false field; add explicit timeout:30
…dled context - Add run-hook.cmd polyglot wrapper for Windows compatibility — routes session-start through bash on Windows (Git Bash, MSYS2, Cygwin) and falls back silently if no bash found so plugin still loads - Fix warning manifest check to look in correct locations: project-local .claude/.context-manifest.json and global ~/.claude/.context-manifest.json instead of the plugin root (which is never writable for marketplace users) - Update warning message skill name: install-context -> context-setup - Restore SessionStart matcher (startup|resume|clear|compact) for explicit session type filtering - Remove bundled scripts/context/ tree (250+ files) — context is downloaded at runtime via /install-context, not shipped with the plugin
Plugin files installed from marketplace are copied with 644 permissions
(no execute bit). Invoking session-start.sh directly requires +x, which
fails silently. Using 'bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"'
bypasses the execute bit entirely — bash reads the file, not executes it.
- hooks.json: replace run-hook.cmd indirection with direct bash invocation
- hooks.json: add explicit timeout:30, remove async:false (default)
- Remove run-hook.cmd and extensionless session-start (no longer needed)
- Ensure session-start.sh tracked as 100644 (read-only) in git
- plugin.json: bump version 1.0.0 -> 1.0.1 so marketplace picks up changes
- plugin.json: update description to OpenAgentsControl branding
…n, remove run-hook.cmd and session-start duplicates
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.
Summary
644permissions (no execute bit). The previoushooks.jsontried to execrun-hook.cmddirectly, which requires+x. This fails silently — the hook never fires.bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"in the command.bashreads the file as a script — it doesn't need+x, only read permission (644). This is the correct pattern for plugin hooks per the Claude Code docs.run-hook.cmdand the extensionlesssession-startcopy — both were part of the now-unnecessary Windows wrapper approach.session-start.shis now tracked as100644(read-only) in git, which is exactly what gets installed.1.0.0→1.0.1so the marketplace detects the update and re-installs for existing users.OpenAgentsControl —prefix so the plugin is clearly identified as part of this repo in the marketplace listing.Type of Change
Checklist
Testing
git ls-files --stageshowssession-start.shas100644bash "${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"runs correctly without+xhookSpecificOutput.additionalContextis present