Skip to content

Fix remote TUI cwd decoding across OSes#21476

Open
etraut-openai wants to merge 2 commits intomainfrom
etraut/fix-remote-tui-cwd-decode
Open

Fix remote TUI cwd decoding across OSes#21476
etraut-openai wants to merge 2 commits intomainfrom
etraut/fix-remote-tui-cwd-decode

Conversation

@etraut-openai
Copy link
Copy Markdown
Collaborator

Fixes #21357.

Why

Native Windows TUI sessions connected to a remote app-server running on another OS can fail during thread lifecycle bootstrap because v2 thread lifecycle responses carry server filesystem paths in AbsolutePathBuf fields. A Linux app-server can return paths such as /home/..., which are not local absolute paths on Windows, so typed deserialization fails before the TUI can finish thread/start.

What changed

  • Route TUI thread/start, thread/resume, and thread/fork responses through a shared lifecycle helper that captures the raw server cwd and deserializes with a local AbsolutePathBufGuard.
  • Preserve the server-native cwd for later remote turn/start requests so the TUI does not send locally decoded placeholder paths back to the app-server.
  • Add regression coverage for lifecycle responses whose path strings need a local base to deserialize.

Verification

  • cargo test -p codex-tui app_server_session
  • just fix -p codex-tui

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94944bee41

ℹ️ 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".

Comment thread codex-rs/tui/src/app_server_session.rs
@etraut-openai
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
Contributor

@fcoury-oai fcoury-oai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this from Windows against a Linux remote app-server. It gets further than before, but I think the PR still doesn't fully fix the issue yet.

Image

The TUI starts, but then skills/list fails with:

AbsolutePathBuf deserialized without a base path

And submitting a prompt fails at turn/start.

So this seems to fix part of the lifecycle path, but not the full cross-OS remote TUI flow described by the title/body.

I think we either need to expand the fix to the other remote app-server responses that carry server paths, or narrow the PR scope/title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows codex --remote fails to start TUI against Linux app-server due to remote Linux path decoding (autogen selfreport from codex)

2 participants