[FEATURE] Plugin/hook system parity for Claude Desktop app (Code/Cowork)

Resolved 💬 3 comments Opened Apr 9, 2026 by bayan9 Closed Apr 12, 2026

Summary

The Claude Code CLI has a plugin and hook system that allows plugins to respond to lifecycle events (PreToolUse, PostToolUse, UserPromptSubmit, SessionEnd, etc.). The Claude Desktop app's Code/Cowork features don't support this same system, making it impossible for CLI plugins to work when using Code/Cowork through the desktop app.

Use case

The cc-amphetamine plugin uses Claude Code hooks to keep a Mac awake while Claude is actively working (via the macOS Amphetamine app). It registers sessions on UserPromptSubmit, refreshes activity on PreToolUse/PostToolUse, and cleans up on SessionEnd. This works perfectly in the CLI but has no equivalent in the desktop app — there's no way to detect when Code/Cowork features are actively running vs. the app just being open.

Request

Expose the same hook/plugin lifecycle in the Claude Desktop app so that CLI plugins work across both interfaces, or provide an equivalent extensibility mechanism for the desktop app's Code/Cowork features.

Alternatives considered

  • MCP server approach: MCP servers start when the app launches and stay running, so they can't distinguish between "app is open" and "Code/Cowork is actively working."
  • Amphetamine app-level trigger: Activates whenever the Claude app is open, which is too broad — it should only prevent sleep during active agentic work.
  • Process monitoring: No reliable external signal to detect when Code/Cowork is active vs. idle.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗