Skip to content

Gemini Models having problems with executing commands #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
SuzayKid opened this issue May 3, 2025 · 1 comment
Open

Gemini Models having problems with executing commands #31

SuzayKid opened this issue May 3, 2025 · 1 comment

Comments

@SuzayKid
Copy link

SuzayKid commented May 3, 2025

First off, sorry to open an issue when a similar one is available.. but i feel i can give more information on the issue and hence i opened a new one...

I am working with linux mint... even simple commands doesnt seem to work
Operating System: Linux Mint 22.1
Kernel: Linux 6.8.0-58-generic
Architecture: x86-64
Hardware Vendor: Apple Inc.
Hardware Model: MacBookAir7,2

open-codex -m gemini-2.0-flash-thinking-exp -a full-auto
╭──────────────────────────────────────────────────────────────╮
│ ● OpenAI Codex (research preview) v0.1.30 │
╰──────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────╮
│ localhost session: ******************************* │
│ ↳ workdir: ~/Projects/******** │
│ ↳ model: gemini-2.0-flash-thinking-exp │
│ ↳ approval: full-auto │
╰──────────────────────────────────────────────────────────────╯
user
explain this codebase to me

command

$ 'ls -R'

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

Error: spawn ls -R ENOENT

user
rewrite the test.txt file to 'i am from linux mint'

command

$ apply_patch '*** Begin Patch
*** Update File: test.txt
--- /dev/null
+++ b/test.txt
@@ -0,0 +1 @@
+i am from linux mint
*** End Patch'

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

Invalid Context 0:
-- /dev/null

command

$ 'echo "i am from linux mint" > test.txt'

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

Error: spawn echo "i am from linux mint" > test.txt ENOENT

codex
I attempted to rewrite the test.txt file for you using both the apply_patch
command and a standard shell echo command, but unfortunately, neither was
successful due to errors in the execution environment.

The apply_patch command failed with an "Invalid Context 0" error when trying
 to create or update the file.

The shell command echo "i am from linux mint" > test.txt failed because the
echo command was not found (ENOENT error).

It appears I am unable to modify or create files in this environment with
the current tools.
@Vlad1mir-D
Copy link

Try this fix: openai#695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants