Skip to content

0.119.0 crashes if config.toml is readonly #17593

@mattolson

Description

@mattolson

What version of Codex CLI is running?

codex-cli 0.119.0

What subscription do you have?

Plus

Which model were you using?

No response

What platform is your computer?

No response

What terminal emulator and version are you using (if applicable)?

No response

What issue are you seeing?

Starting with 0.119.0, if using a config.toml that is readonly, then on startup, after being asked if you trust the directory, codex crashes when trying to save to the config file.

The error given is Error: thread/start failed during TUI bootstrap

In the logs, I see:

2026-04-13T03:43:25.266758Z ERROR codex_tui::onboarding::trust_directory: Failed to set project trusted: failed to persist config.toml at /home/dev/.dotfiles/.codex/config.toml

Caused by:
    Read-only file system (os error 30) at path "/home/dev/.dotfiles/.codex/.tmpdzATN7"

What steps can reproduce the bug?

  • I'm running in a docker container with the config file mounted readonly, but you can probably reproduce this by changing the permissions on config.toml to be readonly.
  • Launch codex on an untrusted directory
  • When prompted, trust the directory
  • Observe that the process crashes

What is the expected behavior?

Prior to 0.119.0, it would fail to persist the preference, but still continue and would be fully usable. I think that's better behavior in this case.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingconfigIssues involving config.toml, config keys, config merging, or config updatesregressionBehaviors that worked in previous versions but were broken due to an update

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions