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_
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗