Ensure program selection always opens target program#217
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| autoopen_warnings, autoopen_error = _maybe_autoopen_program( | ||
| client, files, state.domain_file_id | ||
| ) | ||
| if autoopen_error: | ||
| return autoopen_error |
There was a problem hiding this comment.
Auto-open errors leave selection locked
The select flow locks the requester to the chosen program before calling _maybe_autoopen_program, and when that helper returns an error these lines exit immediately. Because the state was already marked locked, a transient open_program failure now leaves the session locked to a program that was never opened; with the default strict switch policy, subsequent selection attempts for other programs will raise ProgramSelectionError, forcing a session restart to recover. Consider delaying the lock or rolling back the selection when auto-open fails so errors don’t strand the requester.
Useful? React with 👍 / 👎.
…vior-for-program-invocation Ensure program selection always opens target program
Summary
Testing
Codex Task