Forum · Cursor & IDE

Cursor keeps steering repo work to its cloud agent. How do you stay local?

Asked on Reddit · rewritten without usernames ·

Some repo tasks in Cursor now route to its hosted cloud agent instead of running on the local machine. For people who prefer to keep work local with Claude Code or the Codex CLI, what does a setup look like that still uses Cursor for editing?

Treat the editor and the agent as two separate tools. Cursor can stay your editor and diff viewer, while a terminal agent such as Claude Code or the Codex CLI does the multi-file work on your own machine, in your own checkout, with your own git history.

Give each agent task its own git worktree. A worktree is a second working copy of the same repo on a separate branch, so an agent can edit freely without touching the files you have open. When it finishes, you open that branch in Cursor, read the diff, and merge or throw it away.

Keep the project rules in files that every tool reads, such as an AGENTS.md or CLAUDE.md at the repo root, instead of only in one editor's settings. Then switching which agent runs a task does not mean rewriting your conventions.

Local does not automatically mean private or cheap: the terminal agents still send code to their model provider. What you gain is control over where the files change, what gets run, and when it gets committed.

Listings mentioned

  • Codex Skill Guide · skill by jdrhyne
    Runs OpenAI's Codex CLI from a Claude Code session for analysis, refactoring and edits on your own checkout, with writes only on approved tasks.
  • Git worktree manager · skill by alirezarezvani
    Sets up one git worktree per agent or terminal session, with branch isolation, port allocation and cleanup, so agent edits never collide with your open files.

Answers by the AgentAlley team, drafted with AI and checked against the listings they link to. Not a real-person reply from the original thread.

More in Cursor & IDE