Skip to content

Codex agent writes Docker-internal cwd when boost:install runs via Sail #786

@chrispmcgee

Description

@chrispmcgee

Boost Version

2.4.4

Laravel Version

12.56.0

Agent/IDE Name & Version

codex-cli 0.125.0

PHP Version

8.4.18

System Info

CachyOS (Linux 7.0.1) with Laravel Sail

Description

When running vendor/bin/sail artisan boost:install and selecting Codex, the generated .codex/config.toml contains cwd = "/var/www/html" — the path inside the Docker container, not the host filesystem.

Codex CLI runs on the host machine, so it tries to chdir to /var/www/html, which doesn't exist, and the MCP server fails to start:

⚠ MCP client for `laravel-boost` failed to start: MCP startup failed: No such file or directory (os error 2)
⚠ MCP startup incomplete (failed: laravel-boost)

Root cause: Codex::mcpServerConfig() sets cwd to config('boost.executable_paths.current_directory', base_path()). When the Artisan command runs inside Sail, base_path() returns /var/www/html, which gets written verbatim into the host-side TOML config.

The base Agent::mcpServerConfig() does not include cwd, so Claude Code's .mcp.json is unaffected — vendor/bin/sail resolves correctly from the project root.

Workaround: Remove the cwd line from .codex/config.toml after installation.

Steps To Reproduce

  1. Install Laravel with Sail
  2. composer require laravel/boost
  3. vendor/bin/sail artisan boost:install — select Codex with MCP enabled
  4. Inspect .codex/config.toml — observe cwd = "/var/www/html"
  5. Run codex from the project root — MCP fails with "No such file or directory"
  6. Remove the cwd line — MCP starts successfully

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions