Skip to content

TUI trust prompt hides config/batchWrite failure cause when setting project trust #25008

@mahendra202602

Description

@mahendra202602

What version of Codex CLI is running?

codex-cli 0.135.0

What subscription do you have?

corporate

Which model were you using?

gpt-5.5

What platform is your computer?

Linux 5.15.0-316.196.4.1.el8uek.x86_64 x86_64 x86_64

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

macOS Terminal.app, SSH to Linux host

Codex doctor report

What issue are you seeing?

When starting Codex in an untrusted directory and selecting the option to
trust the directory, the TUI shows only:

Failed to set trust for <my_cwd_path>: config/batchWrite failed in TUI

This message is not actionable because it hides the underlying app-server/
config error. The failed operation is trying to persist project trust to the
user config, equivalent to:

[projects."<my_cwd_path>"]
trust_level = "trusted"

What steps can reproduce the bug?

  1. Start Codex in a directory that is not already trusted, for example:

    cd <my_cwd_path>
    codex

  2. At the TUI trust prompt, select the option to trust/continue.

  3. Observe the error:

    Failed to set trust for <my_cwd_path>: config/batchWrite failed in TUI

What is the expected behavior?

The TUI should include the underlying config/batchWrite server error, for
example:

Failed to set trust for <my_cwd_path>: config/batchWrite failed in TUI:

or otherwise surface the JSON-RPC error message/data so the user can
distinguish readonly config, invalid config, app-server failure, and
validation failures.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    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