Add configurable Codex MCP cwd#642
Merged
pushpak1300 merged 4 commits intolaravel:mainfrom Mar 12, 2026
Merged
Conversation
pushpak1300
approved these changes
Mar 12, 2026
pushpak1300
approved these changes
Mar 12, 2026
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
boost.executable_paths.current_directoryconfig option (env:BOOST_CURRENT_DIRECTORY_EXECUTABLE_PATH) to override the MCP servercwdbase_path()behavior as the default fallbackCodexTestWhy
Boost currently generates Codex MCP config with
cwd = base_path(). That works when Boost and Codex both run in the same environment, but it breaks when Boost is executed inside a container and Codex runs on the host.A concrete example is DDEV:
php artisan boost:updateruns inside the DDEV containerbase_path()resolves to a container path like/var/www/html.codex/config.toml, and then tries to launch the MCP server withcwd = /var/www/htmlThe command path can already be overridden safely with
BOOST_PHP_EXECUTABLE_PATH, but there is currently no official way to override the MCP working directory.This uses the existing
executable_pathsconfig group rather than a newmcp.cwdkey because the setting describes the working directory of an executable — consistent with howBOOST_PHP_EXECUTABLE_PATHand friends are already organized.Safety
base_path()remains the fallbackBOOST_CURRENT_DIRECTORY_EXECUTABLE_PATHis setVerification
./vendor/bin/pest tests/Unit/Install/Agents/CodexTest.php./vendor/bin/pint --test config/boost.php src/Install/Agents/Codex.php tests/Unit/Install/Agents/CodexTest.php