Skip to content

fix(request-logger): make Codex command shell-portable - #81

Open
the-rpc wants to merge 1 commit into
ai-hero-dev:mainfrom
the-rpc:fix/request-logger-codex-shell-quoting
Open

fix(request-logger): make Codex command shell-portable#81
the-rpc wants to merge 1 commit into
ai-hero-dev:mainfrom
the-rpc:fix/request-logger-codex-shell-quoting

Conversation

@the-rpc

@the-rpc the-rpc commented Sep 5, 2026

Copy link
Copy Markdown

Summary

The request logger printed Codex commands with the entire
openai_base_url override wrapped in single quotes:

codex -c 'openai_base_url="http://localhost:8787/backend-api/codex"'

cmd.exe treats those single quotes as literal characters, so Codex ignored
the 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. The
troubleshooting guidance now tells users to copy the generated command exactly,
including its quote placement.

Test plan

  • Prettier passes on all changed files
  • npm run typecheck
  • Focused Codex suite — 10 tests passed
  • npm run build
  • git diff --check
  • Manually verified the new quote placement in cmd.exe, PowerShell, Git Bash, and WSL Bash

The complete test run passed 571 tests. Two unrelated OpenCode tests could not
run on Windows because they invoke /bin/sh by absolute path.

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.
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.

1 participant