How the plugin differs from a configuration file
The plugin is a ZIP with five files:.claude-plugin/plugin.json: The plugin name and version.hooks/hooks.json: The hook events. It holds no credentials.scripts/endor-hook.sh: Loadsendor.envand runsendorctl ai-audit claudecode.scripts/bootstrap.sh: Downloads endorctl into the workspace.endor.env: Your API URL, namespace, API key, and secret.
SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, ConfigChange, and Stop. It applies the same policies as Claude Code.
The plugin doesn’t include endorctl. The SessionStart hook downloads endorctl in the background at the start of every task. Hooks allow actions until the download finishes.
Before you begin
Confirm the following requirements before you build the plugin:- Your Claude organization is on a Team or Enterprise plan with Cowork and Skills turned on.
- An organization Owner is available to install the plugin.
- You have an API key with only the AI Audit User role. See Prerequisites to create one.
- You know the namespace that owns your Coding Agent Governance policies.
Build the plugin
Build the plugin with the in-browser generator.- Choose Claude Cowork (organization plugin) as the agent.
- Enter your namespace, API key, and API secret.
- Optional: Enter your tenant’s API URL in API URL if it isn’t
https://api.endorlabs.com. - Click Download to save
endor-cowork-governance.zip.
acme.engineering. The generator rejects a namespace that contains / or :. The API URL goes in its own field.
To build the plugin on an admin machine instead, run scripts/render.sh from the MDM scripts repository. The build needs a POSIX shell and zip.
--env and --skip-endorctl-update options work as for the other agents and go into endor.env. Add --env ENDOR_AI_AUDIT_NO_BLOCKING=true for a monitor-only start.
To build the plugin as a directory for a private repository, pass a directory path to -o instead of a .zip path. The directory must be new or empty.
Install the plugin for your organization
An organization Owner installs the plugin in the Claude organization settings.- Open Organization settings > Plugins & skills in Claude.
- Upload
endor-cowork-governance.zip, or sync a private GitHub repository that holds the plugin directory. - Set the plugin to Required.
version in .claude-plugin/plugin.json goes up. Claude refuses a public repository.
Allow the Endor Labs API host
The Cowork workspace reaches the internet through a proxy that enforces your organization’s allowed domains. An Enterprise organization that restricts network access blocks the Endor Labs API by default.- Open Organization settings > Capabilities in Claude.
- Add the host of your API URL to the allowed domains for network access. The default host is
api.endorlabs.com. - Start a new task. A running task keeps the list it started with.
*.endorlabs.com covers every Endor Labs API host.
Verify the plugin
Check the events in Endor Labs. Claude’s own summary of what a hook did isn’t reliable.- As a member who never installed the plugin personally, open the Cowork tab in Claude.
- Start a task and send a short prompt. This starts the endorctl download.
-
After about two minutes, ask Claude to run
ls -la ~/.endorctl; ~/.endorctl/endorctl --versionin the cloud workspace. A version number means endorctl is ready. -
Send a prompt that uses a tool, such as
List the files in the current folder. - Send another prompt a minute later. endorctl sends queued events only during a later hook.
-
List the hook events in your namespace.
Each event names the member’s email address as the user.
~/.endorctl means the workspace can’t reach the Endor Labs API. See Allow the Endor Labs API host to fix the network access.
An installed endorctl with no events in Endor Labs means the sends are failing. Look for queued rows in ~/.endorctl/aigovernance/localdb/ in the workspace. Check the namespace and the role of the API key.
Update the plugin
Rebuild and upload the plugin again after any of the following changes:- You rotate the API key or secret.
- You change the namespace or the API URL.
- You change the environment variables or the skip-update choice.
- The MDM scripts repository publishes a new release of the plugin.
version in .claude-plugin/plugin.json.
Server-side policy changes need no new plugin. Each task downloads the current endorctl release. endorctl updates need no new plugin either.
Known limitations
The Cowork plugin has the following limitations:- Start of each task: Hooks allow actions until endorctl finishes downloading. About the first minute of every task isn’t audited. A scheduled task can act inside that window.
- End of each task: Closing the workspace discards any events still in the queue. Cowork has no
SessionEndhook yet. - Claude Chat: Chat ignores plugin hooks. Connector calls and code runs in Chat are neither blocked nor recorded.
- Claude Code on laptops: A Required plugin also syncs to each member’s Claude Code. Its hooks exit without auditing in a Claude Code session on a laptop. Deploy the Claude Code hooks to govern those sessions.
- Hooks fail open: A hook that crashes or times out allows the action, as on every other agent.