Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(codex): use project cwd for skill discovery #2330

ClosedDerpedyea(GitHub profile, opens in a new tab)wants to merge 13 commits intomain fromrefs/pull/2330/headopened View on GitHub

What Changed

Codex provider status checks now pass the configured T3 project cwd into the Codex app-server probe instead of always using process.cwd().

This lets Codex discover repo-level skills from the active project, including skills under .agents/skills.

The change also adds a focused regression test that verifies the Codex probe receives ServerConfig.cwd.

Why

Codex discovers repo-level skills relative to the cwd used by the app-server provider probe.

When T3 Code is launched from a different directory than the active project, process.cwd() can point at the T3 server/runtime directory instead of the project directory. In that case, repo-level Codex skills do not appear even though they are valid for the project.

Using ServerConfig.cwd keeps skill discovery aligned with the project T3 is serving.

UI Changes

No UI changes.

Test Plan

  • bunx vitest run apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • bun run lint apps/server/src/provider/Layers/CodexProvider.ts apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • bun run fmt:check apps/server/src/provider/Layers/CodexProvider.ts apps/server/src/provider/Layers/ProviderRegistry.test.ts
  • bun run typecheck --filter=t3

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes
  • No animation or interaction changes

Note

Low Risk Low risk: only changes the cwd used during Codex provider probing (with a fallback to process.cwd()), affecting skill discovery but not auth or data handling.

Overview Codex provider status checks now pass the configured project working directory (ServerConfig.cwd) into the Codex app-server probe instead of always using process.cwd(), improving repo-scoped skill discovery when the server is launched from a different directory.

Adds a focused regression test ensuring checkCodexProviderStatus forwards the configured cwd when ServerConfig is available.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 1bdad4358c1c0107e91d09ef036898516cf41c8a. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix checkCodexProviderStatus to use project cwd for Codex skill discovery

Replaces the hardcoded process.cwd() in CodexProvider.ts with the cwd from ServerConfig when available, falling back to process.cwd() if not. A new test in ProviderRegistry.test.ts verifies the probe receives the configured cwd.

Macroscope summarized 1bdad43.

Open in Devin Review
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro

      Run ID: 889c978c-2ad4-4486-96aa-ecd4625922a7

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Tip

      💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

      Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

      • Generate code and open pull requests
      • Plan features and break down work
      • Investigate incidents and troubleshoot customer tickets together
      • Automate recurring tasks and respond to alerts with triggers
      • Summarize progress and report instantly

      Built for teams:

      • Shared memory across your entire org—no repeating context
      • Per-thread sandboxes to safely plan and execute work
      • Governance built-in—scoped access, auditability, and budget controls

      One agent for your entire SDLC. Right inside Slack.

      👉 Get started


      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved

      Straightforward bug fix that uses the configured server working directory for Codex skill discovery instead of always using process.cwd(). The change is small, self-contained, includes a test, and maintains backwards compatibility by falling back to the previous behavior when ServerConfig isn't available.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. gameroman(GitHub profile, opens in a new tab) approved these changes

    5. Just fixed merge conflicts should be fine now.

    6. gameroman(GitHub profile, opens in a new tab) approved these changes

    7. notkadez(GitHub profile, opens in a new tab) approved these changes

    8. @Derpedyea is attempting to deploy a commit to the Ping Labs Team on Vercel.

      A member of the Team first needs to authorize it.

    9. Closing due to being a stale PR.

Sign in to join this conversation.