Skip to content

Locale en · ko

Don’t Derail the Main Agent — Cursor Side Chats and Cloud Conversation Hooks

By PapaCoder · Published 3 Aug 2026

Summary

Use Cursor 3.11 Side Chats for tangents, and conversation-level cloud hooks (beforeSubmitPrompt, afterAgentThought) to observe and gate unattended agents.

You’re deep in an agent task when a tangent hits: “Wait—where do we register this JWT handler?” Ask it in the main thread and the plan frays. Open a brand-new chat and you re-explain half the repo.

Takeaway: Use Cursor 3.11 Side Chats to park tangents without derailing the main agent, and put conversation-level hooks (beforeSubmitPrompt, afterAgentThought, and friends) in .cursor/hooks.json so cloud agents are observable beyond shell/file gates.

This post follows the 3.11 changelog (2026-07-10) and the Hooks docs.

Why it matters

Agent bottlenecks are not only model quality. One polluted thread mixes implementation, research, and drive-by questions. In the cloud, tool-only telemetry still leaves a hole: you see which commands ran, not which prompt or thought led there.

Side Chats split investigation from execution. Conversation hooks extend the older cloud allowlist (shell/file/tool) so you can block a prompt before it ships, log thinking blocks, and react at turn completion—as code that travels with the repo. That’s how team policy stops living in a wiki and starts living in git.

How it compares

ApproachStrengthGap
Stuff the tangent into the main chatShared contextPlan and tool history get noisy
Brand-new Agent sessionClean isolationRe-briefing cost
Tool/shell hooks only (pre–conversation cloud hooks)Gate risky commands/editsBlind to prompts and reasoning
Side Chat + conversation hooksParallel threads + cloud observability/controlYou must design and verify hooks; re-test per plan/version

Other IDEs have multi-chat. Cursor’s product story emphasizes Side Chats that inherit main-chat context at spawn and can be @-mentioned back into the primary thread. Cloud hooks follow repo .cursor/hooks.json—not your laptop’s ~/.cursor/hooks.json—which is exactly what you want for unattended VMs.

From the changelog:

  • Open with /side, /btw, or the + control atop the chat panel
  • Each side chat is a durable, full agent conversation with context from the main chat
  • Pull findings back with an @-mention

In the Agents Window, Cmd+K searches a local index across transcripts (not just titles/PR numbers). Inside a conversation, Cmd+F jumps matches with a counter—so long agent logs stop depending on scroll memory.

The first time I opened a Side Chat it felt like “just another tab.” Mid-refactor I typed /btw to ask where a type was registered; the main thread’s plan stayed intact while the side thread answered. That was the moment isolation earned its keep.

What cloud conversation hooks unlock

Cloud agents load command-based hooks from .cursor/hooks.json at the repo root. Enterprise can also run team/enterprise-managed hooks from the dashboard. Home-directory hooks never reach the cloud VM.

Officially supported in cloud (docs table) includes tool/file/shell hooks plus conversation/subagent hooks such as beforeSubmitPrompt, afterAgentResponse, afterAgentThought, subagentStart / subagentStop, preCompact, and stop.

Not available in cloud (with documented reasons): sessionStart / sessionEnd, MCP before/after hooks, Tab hooks, workspaceOpen. Hooks also do not run during early read-only exploratory turns; they start once the agent has a writable environment. Cloud runs command-based hooks only—not prompt-based hooks.

Code / config example

A minimal observability stack—gate prompts, append thoughts/responses:

{
  "version": 1,
  "hooks": {
    "beforeSubmitPrompt": [
      { "command": ".cursor/hooks/gate-prompt.py" }
    ],
    "afterAgentThought": [
      { "command": ".cursor/hooks/log-thought.py" }
    ],
    "afterAgentResponse": [
      { "command": ".cursor/hooks/log-response.py" }
    ],
    "subagentStart": [
      { "command": ".cursor/hooks/gate-subagent.py" }
    ],
    "stop": [
      { "command": ".cursor/hooks/on-stop.py" }
    ]
  }
}

beforeSubmitPrompt shape (docs):

#!/usr/bin/env python3
import json, sys

payload = json.load(sys.stdin)
prompt = payload.get("prompt") or ""
blocked = "PRODUCTION_DATABASE_URL" in prompt
out = {
    "continue": not blocked,
    "user_message": "Prompt blocked: looks like a production secret reference."
    if blocked else None,
}
print(json.dumps({k: v for k, v in out.items() if v is not None}))

afterAgentThought receives aggregated text and optional duration_ms; docs currently list no output fields—treat it as observe/log. Command hooks that exit 2 block the action (deny).

Practical use

  1. Main-thread rule: implementation, tests, commits stay on main. Research and comparisons go to Side Chat.
  2. Return path: @-mention a one-line conclusion back; let main update the plan only.
  3. Cloud minimum set: beforeSubmitPrompt + beforeShellExecution + thought/response logging + optional subagentStart gates.
  4. Search first: recover yesterday’s error string via Agents Window Cmd+K before re-asking the same tangent.
  5. Verify: even when docs say supported, run one staging cloud agent and confirm afterAgentResponse / stop fire the way your gate expects.

Senior-engineer perspective

Side Chats are context hygiene, not chrome. Multi-agent work without thread discipline produces transcripts nobody can review.

Conversation hooks matter more to security and ops. Shell guards alone cannot explain why a production path was touched. Gate the entrance with beforeSubmitPrompt, keep append-only thought/response logs, and incident response becomes a decision timeline—not a naked tool list. Design retention and redaction: those logs can contain code and PII.

Using it in Cursor

  1. Mid-feature, /btw a “does this API exist?” question into a Side Chat.
  2. Commit .cursor/hooks.json plus executable scripts (cloud cannot see home hooks).
  3. Launch one cloud run and confirm your JSONL (or equivalent) grows.
  4. Cmd+K for a past similar bug, then re-open that angle in a Side Chat instead of derailing main.

FAQ

Q. Can Side Chats edit files?
A. The changelog describes a durable full agent conversation. Prefer read/investigate habits for side threads; avoid write races with the main agent.

Q. Do cloud agents use ~/.cursor/hooks.json?
A. No. Docs: user-level hooks are unavailable in cloud. Use project .cursor/hooks.json (and Enterprise team hooks if applicable).

Q. Can afterAgentThought rewrite the answer?
A. Docs currently define inputs only—no output fields. Use control hooks (beforeSubmitPrompt, shell/tool, subagentStart) to block or steer.

Q. Forum posts said some hooks don’t fire?
A. CLI/cloud parity has been discussed in the community. Trust the official cloud support table, then measure on your plan before production gates.

Sources

Closing

Agent throughput scales with thread discipline and observability, not longer single prompts. Side Chats keep tangents out of the critical path; conversation hooks make cloud runs explainable.

The lasting edge is less about shortcut memorization and more about hooks committed in the repo becoming the team’s default runtime OS.

Related posts

More in Cursor

Comments

Checking sign-in…

No comments yet.