Skip to main content

How to use Cursor Agent and Claude Code together in one workflow

Summary

  • You can combine Cursor Agent and Claude Code at three levels: give both the same project instructions, run both in the Cursor editor, or put a supervisor over both in one Omnigent session.
  • One AGENTS.md can carry conventions for both. Claude Code can read AGENTS.md in place of CLAUDE.md, and Cursor's rules docs describe AGENTS.md as a simple alternative to .cursor/rules.
  • In Omnigent, each sub-agent picks its own executor.harness, so a cursor coder and a claude-sdk reviewer can work in one session under one set of policies.
  • Omnigent's cursor harness talks only to Cursor's own backend, so it authenticates with CURSOR_API_KEY. The open-source project lists "Status: alpha"; on Databricks, "Omnigent is in Beta".

How to use Cursor Agent and Claude Code together in one workflow

Decide first how tightly the two agents should hand work to each other. For a loose pairing, give both the same instructions file and run them side by side in one editor. For a real handoff, where one agent writes code and the other reviews it, put a supervisor above both. Omnigent, an open-source meta-harness, is built for that: its README says you can mix Claude Code, Codex, Cursor and other agents in the same session, and "ask one agent to review another's work, or split a task across agents".

What are the ways to combine them?

Approach How it works Trade-off
Shared instructions Keep conventions in one AGENTS.md in the repository Both agents follow the same rules; you still move work between them yourself
One editor Install Claude Code's editor extension in Cursor from the "Install for Cursor" link in Claude Code's docs Both agents in one window, with no automatic handoff
Scripted handoff Chain the CLIs in print mode: Cursor's agent -p and claude -p You write the glue; Cursor only proposes file changes unless you add --force
Omnigent session A supervisor agent delegates to a cursor sub-agent and a claude-sdk sub-agent One session and one policy layer, from a project at "Status: alpha"

How do you set up the handoff in Omnigent?

An Omnigent agent is a short YAML file. Sub-agents are tools of type: agent, and the agent YAML spec says each sub-agent picks its own executor.harness and model, so an orchestrator can mix harnesses by role, such as a cursor coder with a claude-sdk reviewer:

name: pair_workflow
prompt: |
  Plan the change. Send the implementation to coder,
  then send the resulting diff to reviewer.

executor:
  harness: claude-sdk

tools:
  coder:
    type: agent
    description: Implement the requested change.
    executor:
      harness: cursor
      model: auto
  reviewer:
    type: agent
    description: Review proposed code changes.
    prompt: |
      You are a careful code reviewer.
    executor:
      harness: claude-sdk

Run it with omnigent run path/to/agent.yaml, or check it first with omnigent run path/to/agent.yaml -p "Say hello". Setup details:

  • The cursor harness is an SDK harness that ships as an optional extra, installed with the same syntax as other extras: uv tool install "omnigent[cursor]".
  • It drives Cursor's cursor-agent, talks only to Cursor's own backend and has no custom API base URL. Authenticate it with CURSOR_API_KEY (or a prior cursor-agent login) and give it a Cursor model id such as auto.
  • The Claude side uses the credential you add with omnigent setup: an API key, a subscription, a compatible gateway or a Databricks workspace profile.

How do you keep both agents in check?

Omnigent policies check every action and allow it, block it or pause to ask you first. Declare them in the agent YAML, set them server-wide, or toggle them per session in the web UI. The builtin ask_on_os_tools asks for approval before Omnigent's file and shell tools run, max_tool_calls_per_session caps tool calls, and cost_budget gates a session on cumulative spend. For parallel work, copy the pattern of Omnigent's Polly example: it delegates to coding sub-agents in parallel git worktrees, then routes each diff to a reviewer from a different vendor than the one that wrote it.

Can teammates watch the two agents work?

Yes. In the web UI, Share sends a link so teammates can watch the session and chat with the agent in real time. A teammate can co-drive with omnigent attach <session_id>, with their messages executing on your machine, or fork the conversation with omnigent run --fork <session_id>. Multi-user accounts turn on with OMNIGENT_AUTH_ENABLED=1.

How Databricks approaches multi-agent coding sessions

On Databricks, "Omnigent is in Beta". Databricks provides a managed Omnigent server that integrates with your workspace's identity provider, model access through the Foundation Model APIs and Unity Gateway, and Databricks Sandbox hosts. In omni setup, credentials are scoped per harness, and choosing Databricks routes that harness's model calls through Unity Gateway, which suits the claude-sdk reviewer. The cursor harness has no custom base URL, so Databricks model routing doesn't apply to it, and a Databricks Sandbox host doesn't accept your own model API keys. Keep both rules in mind when you choose the host for a Cursor sub-agent. Custom policies on Databricks are written in Common Expression Language (CEL); custom Python policies aren't supported.

FAQs

Do Cursor and Claude Code read the same instructions file?

They can. Claude Code reads CLAUDE.md and can read an AGENTS.md in its place, and Cursor supports AGENTS.md as a simple alternative to .cursor/rules.

Can each agent use a different model?

Yes. In Omnigent, each sub-agent sets its own executor.harness and model. The Cursor sub-agent takes a Cursor model id such as auto, not a databricks-* id.

How do I stop two agents from editing the same files at once?

Give each parallel task its own git worktree, as the Polly example does, and add ask_on_os_tools if you want to approve file and shell actions first.

Can I run the pair on a schedule?

Yes. Omnigent's Automations fire a real session for a chosen agent on an RFC 5545 RRULE schedule.

The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.