mirror of
https://github.com/openai/codex.git
synced 2026-11-25 07:23:22 +00:00
Fix: TUI starting in wrong CWD (#23538)
This fixes a regression wher codex could start in the wrong directory when a live local app-server socket was present. The issue was that implicit local socket reuse was being treated like an explicit remote workspace session, which dropped the invoking cwd unless --cd was passed. The change separates local socket transport from true remote workspace semantics. - Plain local startup keeps local cwd, trust, resume, picker, and config-refresh behavior. - Explicit --remote keeps the existing remote cwd behavior. - Added coverage for launch target selection and local-session filtering/cwd behavior. Steps to test: - Start a local app-server from a different directory than the repo you want to use. - Launch codex from a project/worktree without --cd. - Confirm the session starts in the invoking directory, not the app-server process directory. - Confirm explicit codex --remote ... still preserves existing remote behavior.
This commit is contained in:
1 parent
d86352d520
commit
27c4c67b15
8 files changed
+343
-91
No files matched your search
@@ -57,10 +57,7 @@ impl App {
|
||||
AppEvent::OpenResumePicker => {
|
||||
let picker_app_server = match crate::start_app_server_for_picker(
|
||||
&self.config,
|
||||
&match self.remote_app_server_endpoint.clone() {
|
||||
Some(endpoint) => crate::AppServerTarget::Remote { endpoint },
|
||||
None => crate::AppServerTarget::Embedded,
|
||||
},
|
||||
&self.app_server_target,
|
||||
self.state_db.clone(),
|
||||
self.environment_manager.clone(),
|
||||
)
|
||||
@@ -1680,7 +1677,7 @@ impl App {
|
||||
{
|
||||
Ok(()) => {
|
||||
self.chat_widget.update_skill_enabled(path, enabled);
|
||||
if !app_server.is_remote()
|
||||
if !app_server.uses_remote_workspace()
|
||||
&& let Err(err) = self.refresh_in_memory_config_from_disk().await
|
||||
{
|
||||
tracing::warn!(
|
||||
@@ -1724,7 +1721,7 @@ impl App {
|
||||
{
|
||||
Ok(_) => {
|
||||
self.chat_widget.update_connector_enabled(&id, enabled);
|
||||
if !app_server.is_remote()
|
||||
if !app_server.uses_remote_workspace()
|
||||
&& let Err(err) = self.refresh_in_memory_config_from_disk().await
|
||||
{
|
||||
tracing::warn!(error = %err, "failed to refresh config after app toggle");
|
||||
|
||||
Reference in new issue
Block a user