Unable to add content to a file.

Resolved 💬 3 comments Opened Apr 21, 2025 by az-z Closed Apr 21, 2025

What version of Codex is running?

which codex /usr/local/bin/codex (zoom_audio) [az@dell5000 main]$ codex --revision ╭──────────────────────────────────────────────────────────────╮ │ ● OpenAI Codex (research preview) v0.1.2504172351 │ ╰──────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────╮ │ localhost session: ba0f4b49eb744352bc075413a8f76d40 │ │ ↳ workdir: ~/Work/SailTech/Zoom_Capture/main │ │ ↳ model: gpt-4o-mini │ │ ↳ approval: suggest

Which model were you using?

gpt-4o-mini

What platform is your computer?

Fedora 40

What steps can reproduce the bug?

Install as per readme. export key. run as a non priv user:
codex :

!Image

What is the expected behavior?

nope

What do you see instead?

no file created.

Additional information

file eventually gets created after it tries a few times. But after blowing 2 mill tokens in the past 30 minutes, it still can't add anything to the newly created file. I can create (under the same user) files and edit them in a terminal.

View original on GitHub ↗

3 Comments

az-z · 1 year ago

for the existing files:

user
do you see a file "old.txt"?

    command

    $ ls

    command.stdout (code: 0, duration: 0s)

    audio_capture.py
    environment.yml
    gemini.py
    keys
    ... (11 more lines)

    codex
    Yes, the file old.txt exists in the current directory.
user
add a new line with "BLAH BLAH" to it.

    command

    $ "echo 'BLAH BLAH' >> old.txt"

    command.stdout (code: 1, duration: 0s)

    Error: spawn echo 'BLAH BLAH' >> old.txt ENOENT

    codex
    I encountered an issue with appending to the file. Let me try another method.

    command

    $ /bin/sh -c "echo 'BLAH BLAH' >> old.txt"

    command.stdout (code: 0, duration: 0s)


    codex
    The line "BLAH BLAH" has been successfully added to old.txt.

in a separate terminal :

cat ./old.txt 
Blah
BLAH BLAH
````
confirming the second operation was successful.

Difference:
1.  $ "echo 'BLAH BLAH' >> old.txt" -> FAILED
2.   $ /bin/sh -c "echo 'BLAH BLAH' >> old.txt"  --> WORKED

Same thing with creating a new file.

**Issue:**
 When updating /creating new files with code, it blows past TPM and tokens in a heartbeat for any decent code size rending the app unusable.
az-z · 1 year ago

possible dup of #409

az-z · 1 year ago

and clearly #320.

I'm closing as dub.