Codex app: Mental model for "Run" script and Worktrees are both broken
What version of Codex is running?
Codex app 260202.0859 (517)
What subscription do you have?
Pro
Which model were you using?
_No response_
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
I'm really struggling to wrap my head around the design of projects. There's three components to a project that need to be scoped:
- Threads
- "Run" session
- Worktrees
Threads:
It's totally fine to have multiple threads running inside of a project locally. This is akin to having multiple TUIs open which I've been doing for a while. The trick is keeping them all working on different parts of the code so they don't clobber one another. That leaves the difficulty of separating agents up to the user, but at least it's a clear mental model.
"Run" session:
If a project : repo is 1:1, it means that a project can likely only maintain one "Run" session at a time. At least my product, which I believe is relatively common, launches on a certain port and cannot be run multiple times without conflicting with one another. This means the "Run" action cannot belong to individual threads within the same project/repo.
One possible solution: Add terminal sessions as sidebar items rather than in a panel below the prompt input in a single thread. This would also give a place for a "currently running" affordance which is lacking today (fixing the "which thread did I use to run my app?" problem).
Worktrees:
Worktrees further complicate this, and I find their current design to be pretty unusable. When I create a worktree, I would like to be able to run multiple agent threads within the worktree the same way I can run multiple threads in the "Local" setting, but there's no way to do this currently within Codex. Perhaps it's too complicated, but I expected my worktree to show up as a separate heading/category in the sidebar when I created it, and then I could have separate threads nested under it.
Similarly to "Local", I would expect a single "Run" session scope for each worktree. This is technically true today because worktrees can only have a single thread, but this becomes a challenge if worktrees get the ability to have multiple threads.
Worktrees is a pretty inelegant solution to the multi-agent problem, but as long as they're available, they could use more consistent treatment with the Local category. The Conductor app seems to set a good example here.
What steps can reproduce the bug?
- Click the "Run" button in one of your local threads.
- Code for a while across multiple threads.
- Play whack-a-mole trying to find your "Run" session.
What is the expected behavior?
_No response_
Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for the feedback! I'll share these with the team.
Regarding turning a worktree into a project, you actually can. If a worktree is on a branch, you have the option to turn it into a project to run multiple tasks out of it. We could probably improve the icon if it's not clear though.
<img width="1190" height="200" alt="Image" src="https://github.com/user-attachments/assets/3bbed22b-9723-4abb-a5aa-e24c69f113d5" />
Thanks @gpeal! I totally missed this button in the toolbar. I'll give it a shot.
UPDATE: Oh, I see. I haven't been creating branches for my worktrees. That's an added layer of complexity that I haven't been bothering with. In Conductor, I can go straight from worktree to
origin/mainwithout ever touching a branch. Maybe this is a bit non-standard? Regardless, I'm not sure the mental model of "branches can be projects"; I think more in terms of "folders can be projects".Was this feature removed @gpeal ? I definitely don't see that button when running a worktree on a branch
@lukemorales, I'm having the same problem. I was using this feature all the time, it’s really useful.
What happened to it, @gpeal?