Skip to content

dot cloud computer: Codex CLI works in GUI terminal but fails to start from agent command tool #50381

Open

Description

@YoyoSika

What issue are you seeing?

On the ChatGPT dot cloud computer, the preinstalled Codex CLI can complete a real model-and-tool task when launched from the desktop GUI terminal, but starting it through the dot's ordinary command-execution tool fails before a usable session. The two entry points see different local-state files and permissions despite reporting the same UID and HOME paths.

This report focuses on Codex startup and the supported programmatic invocation path. #50012 is the closest related report about the same platform's GUI-versus-agent HOME visibility difference.

Successful control: Codex CLI 0.159.2, launched in the GUI terminal with --no-daemon, Astra/medium, workspace-write, and on-request, executed a shell command that used printf to write a harmless text file and cat to read it back. The file was independently read from the dot's command tool, and the CLI exited 0. A subsequent GUI-launched Codex diagnostic also executed commands and wrote its report.

Failing entry point: A prior launch of Codex 0.159.2 with --no-daemon through the ordinary dot command tool's PTY failed while opening /home/agent/.codex/state_5.sqlite, with SQLite code 14. This is a summary of the observed interactive error; the original PTY output was not archived, so I am not presenting a reconstructed log as a verbatim quotation. The subsequently saved metadata probes below independently confirm the restricted filesystem view.

Independent metadata checks produced:

Path / property GUI launcher Tool subprocess inside GUI-launched Codex Dot ordinary command tool
UID / GID 1000 / 1000 1000 / 1000 1000 / 1000
HOME / CODEX_HOME /home/agent / /home/agent/.codex Same paths Same paths
HOME and CODEX_HOME modes 0700 0700 0755
HOME and CODEX_HOME mount / write check Not captured Read-only, not writable Read-only, not writable
state_5.sqlite Not checked Exists, mode 0644, read-only ENOENT
/tmp/codex-daemon-1000 Mode 0700 Mode 000, read-only Mode 000, read-only

The GUI launcher metadata and tool probes were captured separately during the same investigation. I am not treating the GUI launcher's mode bits alone as proof of its mount flags.

What steps can reproduce the bug?

This requires the hosted dot cloud computer's execution contexts; it is not a generic reproduction on an unrestricted Linux shell.

  1. Use a writable, non-sensitive test directory on the dot cloud computer.
  2. In its desktop GUI terminal, launch the preinstalled Codex 0.159.2 with --no-daemon, using workspace-write and on-request. Ask it to write a small text file with printf, then read it with cat. In the recorded control, the task completed and exited 0.
  3. Through the dot's ordinary command tool with a PTY, run /opt/codex/bin/codex --no-daemon, retaining its normal HOME and CODEX_HOME and the existing sandbox restrictions. The prior attempt failed during local-state initialization as described above.
  4. Compare the following metadata-only probe through the ordinary command tool and a command tool inside the GUI-launched Codex session:
import json, os

paths = [
    "/home/agent",
    "/home/agent/.codex",
    "/home/agent/.codex/state_5.sqlite",
    "/tmp/codex-daemon-1000",
]
result = {"uid": os.getuid(), "gid": os.getgid(), "paths": {}}
for path in paths:
    try:
        st = os.stat(path)
        result["paths"][path] = {
            "uid": st.st_uid,
            "mode": oct(st.st_mode & 0o777),
            "writable": os.access(path, os.W_OK),
            "mount_readonly": bool(os.statvfs(path).f_flag & os.ST_RDONLY),
        }
    except OSError as error:
        result["paths"][path] = {"error": str(error)}
print(json.dumps(result, indent=2))

This probe reads metadata only. It does not open credentials, database contents, or conversation history. The ordinary-tool probe exited 0; that exit code describes the probe, not a successful Codex launch.

What is the expected behavior?

Please clarify whether programmatically launching the official Codex CLI from the dot's ordinary command tool is supported under the existing isolation policy.

  • If supported, provide or repair a supported invocation context in which required local state can be initialized and a real task can finish, while preserving the intended isolation and approval controls.
  • If intentionally unsupported, document that boundary and report it clearly at startup, including the failing path and required capability, rather than leaving users to infer it from SQLite or filesystem errors.

I am not requesting access to protected credentials, unmasking of RPC endpoints, weaker sandboxing, or automatic permission changes.

Additional information

  • Observed October 2, 2026, on the dot's hosted cloud computer, not my personal computer.
  • OS: Debian GNU/Linux 13 (trixie), x86_64; UID/GID 1000. Exact hosted runtime build and terminal-emulator version were not captured.
  • Preinstalled binary: /opt/codex/bin/codex, reporting codex-cli 0.159.2.
  • A separately installed official package reported codex-cli 0.160.0; no successful headless task has been established for it in this environment. In the latest diagnostic, both versions' version/help/exec-help/app-server-help commands exited 0 but emitted:
WARNING: proceeding, even though we could not create PATH aliases: Read-only file system (os error 30)
  • Those help checks are not end-to-end execution tests. No additional headless model turn was launched during that diagnostic after confirming the filesystem restriction. The working GUI diagnostic itself did execute real model/tool work.
  • codex doctor --json was not collected. The investigation used focused metadata probes and existing startup evidence; no full environment dump is included.
  • --no-daemon is a TUI startup option, not evidence that codex exec can avoid all local-state initialization. An app-server initialization or an empty thread alone also does not establish successful inference and command execution.
  • The evidence establishes visibility/writability differences. It does not establish database corruption, invalid authentication, or which platform component owns the isolation boundary.
  • No permissions, mounts, credentials, or sandbox settings were changed. GUI interaction is a verified workaround for the tested task, but is cumbersome for repeated programmatic work.

Related: #50012 for the same-platform filesystem-view mismatch, and #42398 for a separate nested-CLI startup failure involving an installation-ID write requirement. I have not established a shared root cause with #42398. Please consolidate this report if appropriate while retaining the Codex startup observations.

Activity

  1. added
    bug
    CLI
    dots
    sandbox
    on Oct 2, 2026
  2. github-actions commented on Oct 2, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. rmilkowski commented on Oct 31, 2026

    @rmilkowski

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugdotssandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions