Fix --no-extensions flag not preventing extension discovery
When --no-extensions was used, extensionsResult.extensions was an empty array. The condition in buildSessionOptions() checked .length > 0, so preloadedExtensions was not set. This caused createAgentSession() to fall through to extension discovery. Remove the .length > 0 condition so the empty result is passed through, signaling that extension loading was already handled. Fixes #776
This commit is contained in:
@@ -304,7 +304,7 @@ function buildSessionOptions(
|
||||
}
|
||||
|
||||
// Pre-loaded extensions (from early CLI flag discovery)
|
||||
if (extensionsResult && extensionsResult.extensions.length > 0) {
|
||||
if (extensionsResult) {
|
||||
options.preloadedExtensions = extensionsResult;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user