Project-level hooks and root-level hooks no longer work in Cloud Agents

Where does the bug appear (feature/product)?

Background Agent (GitHub, Slack, Web, Linear)

Describe the Bug

When running a Cloud Agent that uses project-level or root-level Cursor hooks, the hooks are never executed. This appears specific to Cloud Agents: the same hooks work correctly when run in a local Cursor environment. As a result, background agents ignore the custom hooks defined in the repository or root and cannot perform the tasks that depend on those hooks.

Steps to Reproduce

  1. Define a project-level or root-level Cursor hook that modifies or extends agent behavior.
  2. Deploy a Cloud Agent (e.g., background agent on GitHub, Slack, Web, or Linear) that is expected to run those hooks.
  3. Allow the agent to run. Observe that the defined hooks are never invoked, and any tasks dependent on them are skipped.
  4. Verify that the same hooks run correctly when executing the agent locally to ensure the hooks themselves are not at fault.

Expected Behavior

Cloud Agents should honor and execute project-level and root-level Cursor hooks just as they do in a local environment. Custom hooks should run reliably in cloud deployments so that background agents behave consistently across environments.

Operating System

MacOS

Current Cursor Version (Menu β†’ About Cursor β†’ Copy)

Version: 2.1.42
VSCode Version: 1.105.1
Commit: 2e353c5f5b30150ff7b874dee5a87660693d9de0
Date: 2025-12-01T02:18:26.377Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Darwin arm64 23.3.0

For AI issues: which model did you use?

GPT-5.1 Codex High

For AI issues: add Request ID with privacy disabled

bc-26a7cc79-f585-4e4e-9896-59fce0e077a4

Additional Information

This issue appears related to a previous bug where Cloud Agents crashed after executing a few tool calls. In this case, there is no crash, but hooks are simply ignored.

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

Hey, thanks for the report - it looks like a bug in Cloud Agents (hooks work locally, but don’t execute in the cloud). I’ll escalate to the team.

Could you please share:

  • A minimal public repo/branch with reproduction
  • The type of cloud agent (GitHub/Slack/Web/Linear) and how you deployed it
  • The exact time (UTC) of the last failure
  • The structure and paths of hook files in the repo
  • Logs/screenshots from Cloud Agent (if available)
  • New Request IDs for failed runs (Privacy Mode is off). You’ve already provided a few IDs - if there are new ones, attach them too

Temporary workaround: Run the agent locally until the cloud fix.

Hi @deanrie:

  • This was on our private repo
  • The Cloud Agent was launched through both the web app and through the Cursor app. The bug seems to happen regardless of where the Cloud Agent was deployed from.
  • The last failure was 15h ago. Cursor does not show exact times. Here’s an example session where the hooks did not run: bc-26a7cc79-f585-4e4e-9896-59fce0e077a4
  • Hook configuration below. It does indeed work locally:

hook.json

{
  "version": 1,
  "hooks": {
    "afterFileEdit": [
      { "command": ".cursor/hooks/track-changes.sh" }
    ],
    "beforeSubmitPrompt": [
      { "command": ".cursor/hooks/track-prompt.sh" }
    ],
    "stop": [{ "command": ".cursor/hooks/stop.sh" }]
  }
}

Directory Structure

.cursor/
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ stop.sh                       # Stop hook that calls TypeScript check logic
β”‚   β”œβ”€β”€ track-changes.sh              # After-file-edit hook for change tracking and auto-formatting
β”‚   └── track-prompt.sh               # Before-submit-prompt hook for capturing user messages
└── tmp/hooks/
    └── agent-change-log.json          # Tracks file changes and conversation history

scripts/cursor-hooks/
β”œβ”€β”€ agent-check.ts                    # Main stop hook logic and validation library
β”œβ”€β”€ change-log.ts                     # Shared utility for reading/writing the change log
β”œβ”€β”€ track-prompt.ts                   # Logic for tracking user messages
β”œβ”€β”€ pr-review-check.ts                # PR review-specific stop logic
└── lint-diff.ts                      # Linting logic for changed files (scoped to current generation)

Thanks for the details. I see that hooks work locally, but are ignored in Cloud Agents - this confirms a bug on the cloud environment side.

I’ll pass this to the team with priority - Cloud Agents should execute hooks the same way as the local environment.

Temporary workaround: Run agents locally through Cursor IDE until cloud hook execution is fixed.

1 Like

Hi @deanrie, any updates on this bug? It’s slowing down our team significantly.

Any update here?

Cursor hooks never work for me

I have tried the shell format, writing them manually etc. Different types, afterWriter, stop etc.

Nothing works, it never remembers to run them

Hi @deanrie, pinging you again to see if there’s been any movement on this. Our team is anxiously waiting for this fix :slight_smile:

Hi @deanrie, any updates on this?

Hi @deanrie , any chance this makes it off the backlog? It’s really holding back our team, specifically because we cannot use hooks in Cloud Agents.

Hey, thanks for the ping. The bug is confirmed and the team is investigating it. Unfortunately, there’s no ETA yet. A temporary workaround is to run the Agent locally in Cursor.

Just want to bump this as its high priority for my team

1 Like

Hi @deanrie, it was great to see the focus on bug fixes in the latest release. Any news on this? It’s still very much holding back our team.

Going to keep bumping this @deanrie I know this should only take an afternoon for someone to fix and would be greatly appreciated.

1 Like

Bumpppp

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.