feat(skills): probe sandbox for skill eligibility#29327
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62d695cc3b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Greptile SummaryThis PR introduces a sandbox bin-probing layer so that skill eligibility checks for Key findings:
Confidence Score: 2/5
Last reviewed commit: 4a0b36b |
62d695c to
4a0b36b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a0b36b1ff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
4a0b36b to
62c4b99
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62c4b99f4b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
62c4b99 to
5bdc4a2
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5bdc4a2005
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
5bdc4a2 to
0960618
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db14888076
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
db14888 to
a2487e1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2487e1834
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
a2487e1 to
5ddb837
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ddb837007
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
5ddb837 to
e354a45
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e354a45759
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
e354a45 to
536713d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 536713dd9e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
536713d to
36e3cfd
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36e3cfd315
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
36e3cfd to
4a74a90
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4a74a9046f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
4a74a90 to
ca7ee9c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ca7ee9c70f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
ca7ee9c to
07dc406
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 07dc406968
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
07dc406 to
da45919
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da45919498
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
da45919 to
926efae
Compare
926efae to
f441706
Compare
|
Thank you @chatgpt-codex-connector and @greptile-apps for the thorough multi-round reviews. Here is a summary of all fixes incorporated based on your feedback, as of the latest commit Fixes from review feedback
Known limitations (deferred to follow-up)
I've also updated the PR description to reflect the full scope of changes (18 files) and the robustness improvements made during review. |
|
To use Codex here, create a Codex account and connect to github. |
|
Your summary is spot-on. I've verified all the key fixes in commit f441706: ✓ Core functionality enabled -
✓ Correct eligibility logic - The ✓ Session-aware eligibility - Both ✓ Robust container matching - ✓ Concurrency safety - The generation counter pattern prevents stale refreshes from overwriting newer results. ✓ Correct session context - ✓ CI test mocks - Proper stubs added for This is solid work. The feature is now properly gated, session-aware, and resilient to edge cases. |
|
Great work on the sandbox eligibility probing — this is a much-needed improvement for sandbox-enabled deployments. I wanted to flag a related but orthogonal issue in the existing The parsing bug: I have a fix in #28406 that adds Since this parsing bug exists independently of sandbox configuration, would it make sense to land #28406 separately, or would you prefer to incorporate the Record-format handling into this PR? |
Summary
When the gateway runs inside a Docker container (the default self-hosted topology), skill eligibility checks for
requires.bins,requires.anyBins, andosare evaluated on the gateway host rather than inside the sandbox container where the skill actually executes. This causes skills likecoding-agent(which requiresgh) to be silently dropped from the system prompt even thoughghis available in the sandbox image.This PR adds a sandbox bin-probing layer — mirroring the existing remote-node pattern — so that the sandbox container/image is queried for available binaries and its platform is included in OS eligibility checks.
Changes
src/infra/skills-sandbox.tsdocker exec/docker run, with caching and generation countersrc/gateway/server.impl.tsrefreshSandboxBinsCacheinto gateway startup, skills change, and config hot-reloadsrc/agents/skills/types.tssandboxfield toSkillEligibilityContextsrc/shared/config-eval.tshasSandboxBin/hasAnySandboxBin/sandboxPlatformsto eligibility evaluationsrc/agents/skills/config.tsshouldIncludeSkillsrc/agents/skills/refresh.ts"sandbox"toSkillsChangeEvent.reasonenumsrc/commands/agent.tssrc/auto-reply/reply/commands-system-prompt.tssrc/auto-reply/reply/session-updates.tssrc/auto-reply/reply/get-reply-directives.tssessionKeyfor sandbox status resolutionsrc/auto-reply/reply/get-reply-inline-actions.tssessionKeyfor sandbox status resolutionsrc/auto-reply/skill-commands.tssrc/commands/status-all.tssrc/cron/isolated-agent/skills-snapshot.tssrc/cron/isolated-agent/run.tssessionKeyfor sandbox status resolutionsrc/gateway/server-methods/skills.tssrc/shared/config-eval.test.tssrc/cron/isolated-agent/run.skill-filter.test.tsagents/sandbox.jsandinfra/skills-sandbox.jsHow it works
skills-sandbox.tscollects allrequires.bins/requires.anyBinsfrom workspace skills.containerPrefixand verifying the container's image to avoid probing stale or incorrect containers.docker execon a running container, then falling back todocker run --rmagainst the configured image.getSandboxSkillEligibility(). A generation counter prevents race conditions from concurrent refreshes. The cache distinguishesnull(not yet probed) from empty set (probed, nothing found) so that OS-only skills are not incorrectly filtered.evaluateRuntimeEligibilitynow checks sandbox bins between local and remote, and includes the sandbox platform in OS matching.sandboxRuntime.sandboxed), preventing skills from being advertised in non-sandboxed sessions.Testing
8 new test cases in
config-eval.test.tscovering:requires.binsandrequires.anyBinsSandbox mocks added to
run.skill-filter.test.tsto ensure CI passes.Fixes #29254
Checklist