Feature request for product/service
Cursor IDE
Describe the request
Problem
A stop hook’s only output is followup_message, which auto-submits a new user turn. That turn renders below the agent’s final answer. So any hook doing useful end-of-turn work — capturing notes, logging, generating a post-run summary, continuing an iteration loop — pushes the answer out of the viewport. On a small screen the last thing the user sees is the hook’s bookkeeping, not the answer they asked for.
There’s no userland workaround, because every other hook is disqualified:
| Hook | Why it can’t solve this |
|---|---|
stop / subagentStop |
followup_message always renders as a fresh user turn below the answer. |
afterAgentResponse |
Fires after the final message but returns nothing — observe-only, can’t reposition. |
beforeSubmitPrompt |
Fires on user input, not before the agent’s final generation — wrong end of the turn. |
postToolUse |
Can inject additional_context, but fires after every tool with no “last tool before the agent answers” signal. |
Request
Either of:
- A background/collapsed render flag for
stopcontinuations (preferred + sufficient) — let astophook mark itsfollowup_messageas a side effect so the TUI collapses/backgrounds it, leaving the agent’s answer as the last visible block. The work still runs and still lands in the transcript; it just doesn’t occupy the viewport. - A pre-finalization hook — an event that fires when the agent is about to emit its final message, whose output is handled before that message generates, so a hook can complete side-effect work ahead of the answer within the same turn.
Use case
A stop hook captures durable notes after a task touches real code (a common memory/knowledge-tooling pattern). On a 13" laptop the agent answers, then the hook forces a capture turn that renders below and scrolls the answer out of view. With a background/collapsed flag the capture runs and is recorded but stays out of the viewport.
Note
This is a shared limitation of current agent-hook models, not Cursor-specific — the identical primitive was requested for Claude Code at anthropics/claude-code#76721. Filing here so the same fix has a home on Cursor’s side.