Connect Devin (Windsurf) to Capsule Security for complete visibility into AI coding assistant activity, including prompts, tool execution, file access, and session context.
This integration uses Cascade's hooks system to capture AI coding assistant activity. Hooks are shell commands that execute at specific points in Cascade's lifecycle, providing automated workflows and audit capabilities.
The integration is delivered as a single hooks.json that works on every operating system - each hook carries both a Unix command and a Windows PowerShell variant. Deployed at the system level, the hooks are merged ahead of user and workspace configurations and cannot be disabled by end users.
The following hooks are configured:
| Hook Event | Description |
|---|---|
| pre_user_prompt | User prompts before submission, plus session context collection (skills, MCP servers, settings) |
| pre/post_run_command | Terminal command execution (before and after) |
| pre/post_mcp_tool_use | MCP tool invocations (before and after) |
| pre/post_read_code | File reads (before and after) |
| pre/post_write_code | File edits (before and after) |
| post_cascade_response_with_transcript | Completed agent responses with the full session transcript |
Before you begin, ensure you have:
- Devin Desktop (formerly Windsurf) installed on target devices
- A Capsule Security account with admin access
- A device management tool (Jamf, Intune, Kandji, ...) to deploy files to your fleet
Log in to the Capsule Security portal
Navigate to Settings > Integrations and locate Devin (Windsurf)
In the wizard, select your platform to download the configuration. Capsule generates it for you, including an embedded authentication token scoped to your organization:
- Mac / Linux: a single
hooks.jsonfile - Windows: a
capsule-windsurf-managed.ziparchive containinghooks.jsonand theCapsuleWindsurfHook.ps1companion script
- Mac / Linux: a single
Deploy the files to the following system-level locations via your MDM:
Platform hooks.jsonCompanion script macOS /Library/Application Support/Windsurf/hooks.jsonNot required Linux /etc/windsurf/hooks.jsonNot required Windows C:\ProgramData\Windsurf\hooks.jsonC:\ProgramData\Capsule\WindsurfHooks\CapsuleWindsurfHook.ps1System-level hooks take precedence over user and workspace hooks and cannot be disabled by end users without root permissions
See the platform guides for step-by-step MDM instructions:
Hooks are loaded at application start. Close Devin Desktop completely on target devices and reopen it for the configuration to take effect.
Start a Cascade session and run a simple task to generate activity
Log in to the Capsule Security portal
Navigate to Inventory > Agents and confirm the agent appears
Click on the agent and review the audit logs to verify events are captured:
- Session start event with skills and MCP server context
- User prompt
- Tool execution (commands, file reads/writes, MCP tools)
- Agent responses
If events are not appearing:
Verify
hooks.jsonis at the correct system-level location for the platform (see Step 2)Windows: verify the companion script -
CapsuleWindsurfHook.ps1must exist atC:\ProgramData\Capsule\WindsurfHooks\, where the hooks configuration invokes itConfirm the application was fully restarted after deployment - hooks only load at start
Check the merge order - Cascade combines cloud, system, user, and workspace hooks per action; a user-level configuration cannot disable the managed hooks, but a malformed managed file is skipped silently
JetBrains plugin users - the Windsurf JetBrains plugin reads a separate user-level configuration (
~/.codeium/hooks.json); this managed deployment covers Devin DesktopContact Capsule Security support if issues persist
Cascade hooks execute with the signed-in user's environment credentials. Before deploying the configuration:
- Review all hook commands in the generated configuration
- Verify the endpoint URL matches your organization's Capsule instance
- Protect authentication tokens embedded in the configuration (never commit
hooks.jsonto version control)
For help with this integration:
- Email: support@capsule.security
- Include: Your organization ID, integration status, and any error messages