feat: make pctx/Code Mode an optional dependency via 'code-mode' feature#7567
Merged
feat: make pctx/Code Mode an optional dependency via 'code-mode' feature#7567
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 96a66956cd
ℹ️ 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".
96a6695 to
c36e1f7
Compare
Gate pctx_code_mode behind a Cargo feature flag so users can build from source without building V8 in environments where binary prebuilts are disallowed. The 'code-mode' feature is enabled by default so existing builds are unaffected. Building with --no-default-features omits pctx/V8 entirely and removes Code Mode from the platform extensions list.
c36e1f7 to
0d29a05
Compare
jamadeo
approved these changes
Feb 27, 2026
tlongwell-block
added a commit
that referenced
this pull request
Feb 27, 2026
…m-extension-pr * origin/main: Update CODEOWNERS for team restructuring (#7574) Add snapshot test with platform extensions (#7573) Handle Bedrock 'prompt is too long' error (#7550) feat: make pctx/Code Mode an optional dependency via 'code-mode' feature (#7567) chore(release): release version 1.26.0 (minor) (#7512) feat: allow goose askai bot to search goose codebase (#7508) Revert "Reapply "fix: prevent crashes in long-running Electron sessions"" Reapply "fix: prevent crashes in long-running Electron sessions" Revert "fix: prevent crashes in long-running Electron sessions" fix: replace unwrap() with graceful error in scheduler execute_job (#7436) fix: Dictation API error message shows incorrect limit (#7423) fix(acp): Use ACP schema types for session/list (#7409) fix(desktop): make bundle and updater asset naming configurable (#7337) fix(openai): preserve order in Responses API history (#7500) Use the correct Goose emoji 🪿 instead of Swan in README.md (#7485) fix: prevent crashes in long-running Electron sessions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gate
pctx_code_mode(and its V8 dependency) behind a Cargo feature flag so users can build from source without building V8 in environments where binary prebuilts are disallowed.Changes
crates/goose/Cargo.toml: Addedcode-modefeature (default-enabled), madepctx_code_modeoptionalcrates/goose/src/agents/platform_extensions/mod.rs: Gatedcode_executionmodule and itsPLATFORM_EXTENSIONSentry behind#[cfg(feature = "code-mode")]; stub module when offcrates/goose/src/agents/reply_parts.rs: Gated code-execution-specific logic; defaults to disabled when feature is offcrates/goose-cli/Cargo.toml,crates/goose-server/Cargo.toml,crates/goose-acp/Cargo.toml: Forward thecode-modefeatureUsage
cargo buildcargo build --no-default-featuresWhen built without the feature, Code Mode does not appear in the Extensions list in the desktop UI since it is never registered in
PLATFORM_EXTENSIONS.