Skip to content

Self-exec via /proc/self/exe breaks when executable deleted #19132

@dcolascione

Description

@dcolascione

What version of Codex CLI is running?

Main

What subscription do you have?

Yes

Which model were you using?

No response

What platform is your computer?

Linux

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

No response

What issue are you seeing?

Codex tries to exec itself for various purposes by running the executable to which /proc/self/exe points, but when the executable is deleted (e.g. by cargo while hacking on Codex itself), the /proc/self/exe symlink points to the original path plus " (deleted)", which is unlikely to name a working codex binary.

What steps can reproduce the bug?

Delete the running codex binary, perhaps by doing a cargo build of Codex.

What is the expected behavior?

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtool-callsIssues related to tool calling

    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