Skip to content

Codex cannot cURL localhost APIs #4279

@koshyviv

Description

@koshyviv

What version of Codex is running?

codex-cli 0.39.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 5.15.167.4-microsoft-standard-WSL2 x86_64 x86_64

What steps can reproduce the bug?

just asked it to hit localhost:8081

What is the expected behavior?

It should be able to print the response of the local API

koshy@hp:~$ curl localhost:8081
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /</pre>
</body>
</html>

What do you see instead?

• Ran curl localhost:8081
  └   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0
    curl: (7) Failed to connect to localhost port 8081 after 0 ms: Couldn't connect to server

> Ran curl localhost:8081 in this environment and it still returns curl: (7) Failed to connect to localhost port 8081; there’s no listener on 8081 inside
  the sandbox.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions