CLI not respecting the disableResponseStorage setting from the ~/.codex/config.yaml file
What version of Codex is running?
OpenAI Codex (research preview) v0.1.2504251709 │
Which model were you using?
o4-mini
What platform is your computer?
MacOS
What steps can reproduce the bug?
cat ~/.codex/config.yaml
disableResponseStorage: true
model: o4-mini
provider: openai
providers:
openai:
baseURL: https://proxy.x.ai/v1
envKey: OPENAI_API_KEY
DEBUG=1 codex
-- Note disableResponseStorage false
config: {
apiKey: 'KEY',
model: 'o4-mini',
provider: 'openai',
instructions: '',
notify: false,
approvalMode: undefined,
disableResponseStorage: false,
history: [Object],
providers: [Object],
flexMode: false
},
DEBUG=1 codex --disableResponseStorage
-- Note disableResponseStorage true
config: {
apiKey: 'KEY',
model: 'o4-mini',
provider: 'openai',
instructions: '',
notify: false,
approvalMode: undefined,
disableResponseStorage: true,
history: [Object],
providers: [Object],
flexMode: false
},
What is the expected behavior?
The CLI should respect the disableResponseStorage setting from the ~/.codex/config.yaml file without requiring the command-line flag.
What do you see instead?
The disableResponseStorage setting in the configuration file is ignored unless explicitly set via the command line.
Additional information
Additional Information:
Codex CLI Version: OpenAI Codex (research preview) v0.1.2504251709
This issue seems similar to the one discussed in Issue #561, where configuration settings like approvalMode are not respected. However, the recent PR #361 addressing approvalMode does not appear to resolve the disableResponseStorage issue.
Workaround:
As a temporary solution, users can explicitly set the --disableResponseStorage flag when running the CLI to ensure the desired behavior.
2 Comments
I think the disableResponseStorage setting is not persisting because of a mismatch between the loading and saving processes:
disableResponseStorage: storedConfig.disableResponseStorage ?? false,
Potentially Ugly fix
An ugly fix.. there's probably a more sustainable way to handle this:
Add disableResponseStorage to the list of properties in configToSave:
```
const configToSave: StoredConfig = {
model: config.model,
provider: config.provider,
providers: config.providers,
approvalMode: config.approvalMode,
disableResponseStorage: config.disableResponseStorage,
};
Should be fixed by this PR if issues persist. Can reopen.