fix(request-logger): make Codex command shell-portable - #81
Open
the-rpc wants to merge 1 commit into
Open
Conversation
Move the URL quotes inside the openai_base_url assignment so cmd.exe does not pass outer apostrophes to Codex. Verify the new command syntax in cmd.exe, PowerShell, and POSIX shells, and update the tests and troubleshooting guidance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The request logger printed Codex commands with the entire
openai_base_urloverride wrapped in single quotes:codex -c 'openai_base_url="http://localhost:8787/backend-api/codex"'cmd.exetreats those single quotes as literal characters, so Codex ignoredthe override and bypassed the request logger.
Move the quotes inside the assignment:
codex -c openai_base_url='http://localhost:8787/backend-api/codex'The new syntax works in
cmd.exe, PowerShell, and POSIX shells. Thetroubleshooting guidance now tells users to copy the generated command exactly,
including its quote placement.
Test plan
npm run typechecknpm run buildgit diff --checkcmd.exe, PowerShell, Git Bash, and WSL BashThe complete test run passed 571 tests. Two unrelated OpenCode tests could not
run on Windows because they invoke
/bin/shby absolute path.