You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-land canvas-apps sync reminder hook, fixed for Claude Code
Re-applies the hook from microsoft#320, which was reverted in microsoft#327 because it broke
Claude Code. The hook logic (inject-sync-reminder.cs) is restored byte-for-byte;
only the registration wiring changed.
Two defects in microsoft#320, either one fatal:
1. `"hooks": "hooks/hooks.json"` in .claude-plugin/plugin.json. Claude Code's
manifest schema rejects a string path, failing installation outright with
`Validation errors: hooks: Invalid input`. Claude auto-discovers
hooks/hooks.json, so the field is unnecessary — model-apps and power-pages
both ship working hooks without it.
2. The `userPromptTransformed` key in hooks/hooks.json. Claude Code reads that
file too and rejects unrecognized event keys. The resulting hook-load-failure
silently discards the whole file, and also disables the plugin's
canvas-authoring MCP server:
[ERROR] Failed to load hooks for canvas-apps
[DEBUG] Plugin not available for MCP - error type: hook-load-failed
Registration is now split by host. Claude Code reads only
.claude-plugin/plugin.json; Copilot CLI prefers .plugin/plugin.json and falls
back to .claude-plugin/ only when absent. So the Copilot-only event lives inline
in .plugin/plugin.json, where Claude Code never sees it:
Claude Code | hooks/hooks.json (auto-discovered) | UserPromptSubmit
Copilot CLI | .plugin/plugin.json (inline) | userPromptTransformed
Two events are required because the hosts share no usable one: Copilot accepts
UserPromptSubmit as an alias for userPromptSubmitted, but that event has no
output processing, so the reminder would be generated and silently discarded.
Also re-applies microsoft#320's removal of the deprecated generate-canvas-app skill,
which the revert restored, and corrects the AGENTS.md claim that Claude Code
"ignores the Copilot-only event and continues loading UserPromptSubmit" — the
behaviour that caused this outage.
Verified on Claude Code 2.1.220 and Copilot CLI 1.0.76-1: plugin installs and
loads (status enabled, MCP intact) and the reminder reaches the model in both
hosts.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments