Receive error anytime Codex tries to suggest a shell tool call: `Cannot read properties of undefined (reading 'length')`

Resolved 💬 5 comments Opened May 12, 2025 by GitMurf Closed Aug 7, 2025

What version of Codex is running?

0.1.2504301751

Which model were you using?

gpt-4.1, o4-mini and gpt-4o

What platform is your computer?

Windows 11: wsl2 Arch

What steps can reproduce the bug?

I use any model like gpt-4.1, o4-mini or gpt-4o and simply provide a prompt that will suggest a shell tool call like the following:

do I have a license file in my codebase root?

I get the following error:

!Image

What is the expected behavior?

_No response_

What do you see instead?

_No response_

Additional information

_No response_

View original on GitHub ↗

5 Comments

sahil2832005 · 1 year ago

getting same issue for some specific files or binaies

sahil2832005 · 1 year ago

is this issue is in typescript or rust?

GitMurf · 1 year ago
is this issue is in typescript or rust?

The stack trace points to js with an undefined variable that is being accessed. I don't know anything deeper than that.

GitMurf · 1 year ago

Has anyone from the maintainers team had a chance to look at this yet?

codex-maintainers · 1 year ago

Thank you for the feedback! Please try updating to the latest version of Codex CLI and see if the issue persists. If it does, let us know, and we'll be happy to investigate further.