How can I implement an agent with human-in-the-loop input in Cursor Agent mode?

Hey, Cursor already has a few built-in mechanics for this workflow, you just need to combine them.

  1. Plan mode for analyze, confirm, execute

Plan mode is exactly what you want for HITL. The agent is read-only, it builds a plan, asks clarifying questions via AskQuestion (this tool is always enabled in Plan mode), you confirm, and only then it switches to Agent mode and applies changes. Docs: Plan Mode | Cursor Docs

  1. AskQuestion in Agent mode via Rules

In Agent mode, AskQuestion has become more stable, but the agent rarely calls it on its own. A common community workaround is to add this to Cursor Rules (User Rules or .cursor/rules/*.mdc in your project):

Use the AskQuestion tool for any interaction requiring user input like choosing between options, confirming a proposed action, or clarifying an ambiguous request.

More details: Allow AskQuestion tool calls in Agent Mode (or any mode)

Important: with Composer/composer-1.5, AskQuestion is unstable. Report: AskQuestion tool does not work using composer-1.5 but does work with other models
It’s better to use GPT-5.3 Codex, Claude Sonnet, or Haiku.

  1. Snyk and Jira via MCP

For Jira and Snyk integration, the right path is MCP servers: Model Context Protocol (MCP) | Cursor Docs
You connect an MCP server for Jira to fetch the ticket XYZ-123 and one for Snyk to pull the CVE or fix info, then the agent can orchestrate the calls.

Suggested flow for your case:

  1. Prompt in Plan mode: Get ticket XYZ-123 from Jira, fetch vulnerability from Snyk, propose a fix
  2. The agent uses MCP to gather data, builds a plan, then asks via AskQuestion: Update axios 0.x to 1.x, proceed?
  3. You confirm, it switches to Agent mode and applies the edits plus a commit
  4. Add the User Rule above so you still get checkpoints in Agent mode

If you get stuck on something specific, like AskQuestion not firing on a certain model, tell me which model you’re using and the Request ID, and we can dig in.