feat(skills): execute session-scoped command hooks - #3251
Merged
Merged
Conversation
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
Claude-format skills with command hooks were rejected as invalid during discovery. Invoking a supported skill now activates its command hooks in the existing session Hook engine, and the UI distinguishes unsupported capabilities from actual scan failures.
Type and Areas
Type: Feature / bug fix
Areas: Rust Agent Runtime, Core skill/tool/permission/session owners, Desktop skill DTO, Web UI diagnostics, locales, docs, Cargo boundary contracts.
Motivation / Impact
once, and cancel/remove them during session teardown.Bashhooks toExecCommand, translate Bash/Write inputs andupdatedInput, and retain original-input constraints and permission denials. Hookaskrequires a fresh reply through the existing permission mailbox, including in bypass mode.Verification
270 focused Rust tests passed (Core pipeline 52, Core hooks 19, Core skills/imports 82, interaction contracts 47, process contracts 29, skill contracts 41):
After integrating current upstream/main, these also passed:
The three frontend files passed 43 tests; i18n reported zero warnings. The architecture checker regression suite also passed 148 tests.
Reviewer Notes
AI-assisted implementation with focused automated testing. No packaged-app UI capture or full multi-device E2E was performed. Local execution and remote-workspace rejection are covered; Remote Control, Peer Device, and Detached Dispatch E2E remain unverified.
Only synchronous command handlers and the engine's existing lifecycle events are supported. Project skills require the project-hook gate. Registrations are process-local and must be reactivated after a runtime restart. SSH/remote-workspace activation fails explicitly without running commands on the controller. Native hooks.json retains its existing Codex decision contract.
Checklist