What happened
While exercising current main, I found that updating shell UI dimensions through config.setShellExecutionConfig(...) removes existing shellExecutionConfig fields already present on the Config instance.
I reproduced this against built origin/main code in a clean worktree (5fc8fea8d762d67d3bff14d00307138faff0bca5) by instantiating Config with:
sandbox.enabled = true
sandbox.command = "windows-native"
sandbox.networkAccess = false
shellBackgroundCompletionBehavior = "notify"
Then I called config.setShellExecutionConfig(...) with only the fields the interactive UI currently sets (terminalWidth, terminalHeight, pager, showColor, sanitizationConfig, sandboxManager).
Observed output:
before {"sandboxConfig":{"enabled":true,"allowedPaths":[],"includeDirectories":["C:\\Users\\Jason\\.gemini\\tmp"],"networkAccess":false,"command":"windows-native"},"backgroundCompletionBehavior":"notify","terminalWidth":80,"terminalHeight":24}
after {"terminalWidth":123,"terminalHeight":45}
Expected
Calling setShellExecutionConfig(...) to update layout-related fields should preserve existing fields that are still part of ShellExecutionConfig, especially behavior/security-related ones such as:
sandboxConfig
backgroundCompletionBehavior
Actual
Those fields are dropped from the config object after setShellExecutionConfig(...) runs.
Why this matters
The interactive app calls config.setShellExecutionConfig(...) during normal UI operation, so this is not just an internal inconsistency. It means runtime shell behavior can drift away from the config established during startup.
Likely area
packages/core/src/config/config.ts
Config.setShellExecutionConfig()
packages/cli/src/ui/AppContainer.tsx
What happened
While exercising current
main, I found that updating shell UI dimensions throughconfig.setShellExecutionConfig(...)removes existingshellExecutionConfigfields already present on the Config instance.I reproduced this against built
origin/maincode in a clean worktree (5fc8fea8d762d67d3bff14d00307138faff0bca5) by instantiatingConfigwith:sandbox.enabled = truesandbox.command = "windows-native"sandbox.networkAccess = falseshellBackgroundCompletionBehavior = "notify"Then I called
config.setShellExecutionConfig(...)with only the fields the interactive UI currently sets (terminalWidth,terminalHeight,pager,showColor,sanitizationConfig,sandboxManager).Observed output:
Expected
Calling
setShellExecutionConfig(...)to update layout-related fields should preserve existing fields that are still part ofShellExecutionConfig, especially behavior/security-related ones such as:sandboxConfigbackgroundCompletionBehaviorActual
Those fields are dropped from the config object after
setShellExecutionConfig(...)runs.Why this matters
The interactive app calls
config.setShellExecutionConfig(...)during normal UI operation, so this is not just an internal inconsistency. It means runtime shell behavior can drift away from the config established during startup.Likely area
packages/core/src/config/config.tsConfig.setShellExecutionConfig()packages/cli/src/ui/AppContainer.tsx