Skip to content

Codex MCP rejects explicit project_path from a projectless cwd #505

Description

@maverickalo

Summary

In TraceDecay v0.0.73, the Codex MCP server can fail before dispatching a
read-only tool with an explicit project_path when Codex launched the server
from a projectless working directory.

Reproduction

  1. Register and index a repository at /path/to/repo.

  2. Confirm tracedecay projects context /path/to/repo resolves it.

  3. From an unindexed directory such as /Users/example, run:

    tracedecay tool tracedecay_context \
      --args '{"project_path":"/path/to/repo","task":"verify selection"}'
  4. The call fails with:

    no TraceDecay index found at '/Users/example'
    
  5. The outer CLI selector succeeds from the same directory:

    tracedecay tool --project /path/to/repo tracedecay_context \
      --args '{"task":"verify selection"}'

The same failure occurs through the Codex plugin because its generated MCP
configuration launches tracedecay serve without --path.

Expected behavior

Read-only selectors such as project_path, project_id, and
project_selector should resolve through the global registry before the
server requires an active project derived from its process working directory.

Current workaround

Pin the Codex MCP launch to a registered bootstrap project:

{
  "args": ["serve", "--path", "/path/to/repo"]
}

Once bootstrapped, explicit read-only project selectors work. This workaround
is not ideal for genuinely projectless Codex tasks and is overwritten by
plugin refreshes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions