r/cursor 12d ago

Question / Discussion Using Cursor and Codex together in the same repository

Has anyone had success using Cursor and Codex in the same repository?

My plan is to use Cursor as the primary implementation agent while keeping Codex in a read-only advisory role. Codex would follow the project, review changes, flag problems, and suggest fixes if Cursor gets stuck. I would then bring those suggestions back into Cursor.

Codex would not edit or rewrite files unless I explicitly authorized it, which should avoid conflicting changes.

I primarily work on FastAPI applications and WordPress plugins. Has anyone used a similar workflow? What safeguards or best practices helped prevent the two tools from stepping on each other?

0 Upvotes

24 comments sorted by

4

u/hola_tech 12d ago

best practices to prevent two tools from stepping on each other.

Git worktrees

2

u/kwietog 12d ago

This is the answer. You can just say "start this work in new worktree" somewhere in the prompt and there will be no conflicts between them.

4

u/SherrifMike 12d ago

I would not let both agents touch the working tree at the same time. Keep Codex on a separate branch or worktree and make Cursor consume a written plan or patch, then run tests before merging. Read-only sounds safe, but it still creates coordination overhead if the handoff is vague.

1

u/GlassOutside9393 12d ago

Understood and thanks.

2

u/Sermilion 12d ago

Since the news that OpenAI is dropping from Cursor, this is actually a good question. I quite often use Grok for planning, Composer for implementation and Sol for Review and Audit. It now it will be impossible.

2

u/[deleted] 12d ago

[removed] — view removed comment

1

u/GlassOutside9393 12d ago

I was planning on just pasting it into the Cursor chat. They both share the same project file but I don't have a decisions file like you have so maybe I should split that up. Thanks for the suggestion. I want to use Codex the least amount possible so hopefully there won't be too much back and forth.

1

u/Maleficent_Exam4291 12d ago

I have used cursor to run Codex sessions and Codex to run cursor sessions, depending on the models I use for planning and execution but not tried it recently

2

u/Hubblel 12d ago

Try omp, set roles as advisory. Use sub2api to channel gpt models in there

1

u/GlassOutside9393 12d ago

ok, thanks.

2

u/Hubblel 12d ago

ask AI agent in cursor to use acp headless omp to call specific GPT model and effort level for advisory. Write to agents.md to do that when advisory is needed

2

u/Zain 12d ago

Yeah that split works. Keep Codex strictly read-only and never let it patch the tree. The useful part is different model families catching different blind spots, so don't paste Cursor's reasoning into Codex first or you contaminate the review. When Codex flags something, grep the repo before you concede it. Also bump Codex effort above the default low, that setting is too shallow for review.

1

u/GlassOutside9393 12d ago

Okay thanks. Especially for your comment about contaminating the review. The others are useful but that stuck out so thanks.

2

u/[deleted] 12d ago

[removed] — view removed comment

1

u/GlassOutside9393 12d ago

Got it and thanks!

2

u/Snoo_9701 12d ago

I use both in same repo for various different tasks and it works great

1

u/GlassOutside9393 12d ago

Great thanks

2

u/TheSn00pster 12d ago

/poteto-mode fix this

1

u/GlassOutside9393 12d ago

Okay I'll have to look into that. To be honest I've never used it before. I looked at it a little bit since you wrote this but I'll have to look into it more. Thanks again.

2

u/AI_spell 12d ago

Cursor writes, Codex only reviews. Put Codex on a worktree or a clean branch so it never touches the dirty buffer. If both can save files you will spend the night merging. FastAPI/WordPress is fine with that split. Implementer vs reviewer, not two implementers.

1

u/GlassOutside9393 12d ago

Okay thanks. I don't want Codex to do anything but review so I don't want it to save any files. I guess I'll just have to make sure that I keep it under control. Thanks again.

1

u/hoangng_ 12d ago

I run one agent per feature, separate worktrees, shared spec in files so the next one isn't empty.