Cursor SDK Adds run.steer to Guide Active Agents
The Cursor SDK now includes run.steer, letting developers redirect active AI agents in Node.js without canceling tasks or losing progress.
A new method in the TypeScript package injects prompts into active runs and shifts foreground child tasks without restarting the process.
Anyone who builds with autonomous coding agents knows the frustration: you kick off a complex task, watch the model take a wrong turn three files in, and realize you cannot intervene. Up until now, your options were grim: abort the entire run and discard the tokens already burned, or sit on your hands until the loop finishes before attempting a fix. Anysphere, the team behind Cursor, tackled that bottleneck by adding run.steer() to its official TypeScript Cursor SDK (@cursor/sdk).
Announced on X by the Cursor team, the feature lets developers send instructions directly into an agent’s active reasoning turn. Instead of behaving like an immutable black box, the running process can now ingest guidance through code while working on files.
The problem with waiting on agent runs
Local agents inspect directories, draft test files, and execute terminal commands sequentially. When an intermediate assumption fails or a developer spots a missing requirement early on, canceling the process throws away all progress made up to that point.
Letting an errant model run unchecked burns developer time and API credits. The run.steer() method targets that exact window: it allows you to inject corrections while the model is actively reasoning through its current task.
How run.steer Works in the Cursor SDK
Calling run.steer(text) attempts to merge the prompt into the active turn immediately. The method returns a Promise resolving to one of two outcomes:
complete_delivered: the instruction merged into the active turn, and the agent incorporated it into its current reasoning pass.revert_to_followup: the turn completed before the steer arrived, requiring the prompt to be dispatched as a standard subsequent turn viaagent.send().
The most notable engineering choice involves parallel tasks. When the parent agent assigns work to a foreground subagent, run.steer() does not kill that child process. Instead, the runtime automatically demotes the subagent to the background. This frees the parent agent to process the new steer prompt immediately while the child task continues uninterrupted.
Output from backgrounded subagents remains linked to the parent execution. Listeners like stream() and wait() keep tracking background jobs until they finish. In version 1.0.32 of the SDK, Anysphere refined this sequence: if the parent agent completes its turn while awaiting background tasks, incoming steers now execute immediately as the next turn rather than falling back to revert_to_followup.
Technical limits and cloud parity gaps
Anysphere’s technical documentation notes clear boundaries for the method:
- Local Node.js only: the capability works exclusively inside local Node.js environments.
- No cloud agent support: for runs on Cursor Cloud or detached local handles, the method exists in the TypeScript types but always resolves to
revert_to_followup. That functional divide prompted threads on Cursor’s developer forum asking for feature parity with the web interface. - No selective cancellation: developers cannot terminate a specific subagent; any active foreground child process is automatically moved to the background.
- Missing from Python: the Python SDK (
cursor-sdk) does not include the method.
Real-time control for headless agents
Guiding an agent mid-thought has long been a staple of Cursor’s visual editor. Bringing that capability to programmatic workflows closes an annoying gap between the GUI and headless terminal automation. Rather than treating agents as fire-and-forget routines, developers can now steer runs on the fly without tossing out completed work.