Preserve current branch with Codex Remote Agent

Please remember that last selected branch of an Environment. Currently, when you refresh the page it defaults back to main. If you are not paying attention, you can think you are sending the task on the branch you’ve been using.

Unfortunately, you have to refresh the page to get it to update correctly and accurately reflect current state.

1 Like

I think I just ran into this. I was not aware that different tasks refer directly to a different branch. There was a bug in the “most recent” (to me) branch after making a pull request to GitHub. I went back to the task window I’d been working in, and asked about that commit (3 or 4 prior). It said it only had a shallow get of a couple of branches at a time, and the commit was not in its context. Your comment helps me understand why. While working on a DIFFERENT task, suddenly it found the bug while running a test. Same bug I’d found. “I thought you couldn’t see this?”

Thanks for your comment!

1 Like

Yeah, it’s more a context visibility problem. Assuming the main branch has what you need, you can easily change the PR to target the branch you really intended. But, if the main branch doesn’t have the context to complete the task correctly, then you have to create another task.