Skip to content

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

Open
Derpedyea wants to merge 13 commits intopingdotgg:mainfrom
Derpedyea:fix/codex-repo-skill-discovery
Open

fix(codex): use project cwd for skill discovery#2330
Derpedyea wants to merge 13 commits intopingdotgg:mainfrom
Derpedyea:fix/codex-repo-skill-discovery

Conversation

@Derpedyea
Copy link
Copy Markdown

@Derpedyea Derpedyea commented Apr 24, 2026

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 for commit 1bdad43. Bugbot is set up for automated code reviews on this repo. Configure here.

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

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.

@github-actions github-actions Bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 24, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Apr 24, 2026
@macroscopeapp
Copy link
Copy Markdown
Contributor

macroscopeapp Bot commented Apr 24, 2026

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.

@notkadez
Copy link
Copy Markdown

lgtm

@macroscopeapp macroscopeapp Bot dismissed their stale review April 30, 2026 13:45

Dismissing prior approval to re-evaluate 5699f40

@Derpedyea
Copy link
Copy Markdown
Author

Just fixed merge conflicts should be fine now.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

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

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants