#### Troubleshooting

# Agent troubleshooting

Fixes for common Agent issues with file access, rules, terminal commands, and more.

## How can I improve agent accuracy?

* Be specific in your prompts: include expected behavior and constraints
* Use [Plan mode](/build/agents-window/help/ai-features/plan-mode) first for tasks that touch many files
* Start a new chat when you finish a feature or switch tasks
* Add [rules](/build/agents-window/help/customization/rules) in `.cursor/rules/` for patterns you want Agent to follow every time
* Type `@` followed by a file or folder name to give Agent targeted context

## What if agent doesn't pick up my files?

1. Check your `.cursorignore` file in the project root. Files listed there are blocked from Agent, codebase search, and `@` mentions.
2. Check `.gitignore`. Patterns there can also prevent Agent from discovering files.
3. Reindex your project: open the command palette and search for "Reindex."
4. Attach files directly by typing `@` followed by the filename in the chat input.

## How do I undo agent changes?

Hover over a previous message and click **Restore Checkpoint** in the bottom right to roll back all changes Agent made after that point.

Checkpoints are stored locally and are separate from git. Use git for permanent version control.

## What if agent sets CI=1 in terminal commands?

Grok Build sets `CI=1` as an environment variable when running terminal commands through Agent. This helps terminal tools produce cleaner output. If your project behaves differently when `CI=1` is set (for example, skipping interactive prompts or using CI-specific paths), you can unset it in your commands:

```bash
unset CI && your-command-here
```

Or add this to a rule so Agent always unsets it:

```text
When running terminal commands, prefix with `unset CI &&` if the command's behavior changes in CI environments.
```

## How do I troubleshoot a self-hosted machines setup?

Run `cursor-agent worker debug` for a preflight report. See [Self-Hosted Machines](/build/agents-window/help/ai-features/self-hosted-machines#how-do-i-troubleshoot-a-self-hosted-machines-setup) for common fixes and when to contact support.

## How do I check if my pool is at capacity or why an agent run failed to start?

Check the [Cloud Agents dashboard](https://grok.com/dashboard/cloud-agents/machines) or call `GET /v0/private-workers/summary`. See [Self-Hosted Machines](/build/agents-window/help/ai-features/self-hosted-machines#how-do-i-check-if-my-pool-is-at-capacity) for failure modes and scaling guidance.

## What if a Cloud Agent web attachment is too large?

If [cursor.com/agents](https://cursor.com/agents) shows `<filename> is too large (4MB limit)`, see [Cloud Agent web attachment limits](/build/agents-window/help/ai-features/cloud-agents#what-are-the-attachment-limits-for-cloud-agents-on-the-web) for supported file types and ways to reduce or split the file.

## What if I see "Agent Execution Timed Out"?

This error means Grok Build's extension host didn't finish starting within 60 seconds, so Agent features couldn't initialize. The same root cause shows up as "Timeout waiting for EverythingProvider" in network diagnostics.

Causes vary, so collect logs before changing anything:

1. Press **Cmd/Ctrl+Shift+P** and run **Developer: Export Logs...**
2. Select **Main**, **Window**, and **Extension Host**
3. Also check **Output → Extension Host** (Cmd/Ctrl+Shift+P → "Output", then pick "Extension Host" from the dropdown). If it's empty, take a screenshot; an empty panel is a strong diagnostic signal.
4. Share the exported zip and screenshot with support, along with your OS and Grok Build version.

On managed or enterprise machines, endpoint security software (antivirus, EDR) is one possible cause. If your IT team confirms a security agent is active, share the [Endpoint Security Configuration](/build/agents-window/enterprise/endpoint-security) page so they can add the right process and path exclusions.

## How do I report a bad agent response?

1. Click the **...** menu at the bottom of the response and select **Copy Request ID**.
2. Post to [forum.cursor.com](https://forum.cursor.com/) with the request ID, steps to reproduce, and your system info (found in **Grok Build > About Grok Build** on macOS or **Help > About** on Windows/Linux).

## Related

* [Agent reference](/build/agents-window/agent/overview)
* [Plan Mode](/build/agents-window/agent/plan-mode)
* [Rules](/build/agents-window/rules)
* [Terminal sandbox](/build/agents-window/agent/tools/terminal)
* [Endpoint security configuration](/build/agents-window/enterprise/endpoint-security)
* [Network and proxy](/build/agents-window/help/troubleshooting/network)
* [MCP troubleshooting](/build/agents-window/help/customization/mcp#how-do-i-troubleshoot-mcp-servers)
