Closed
Description
Is there an existing issue for the same bug?
- I have checked the troubleshooting document at https://docs.all-hands.dev/modules/usage/troubleshooting
- I have checked the existing issues.
Describe the bug
I have observed weird behavior that I have not yet have had time to entirely debug, but I thought I'd open a tracking issue. I'm currently working on using OpenDevin to update a large number of files, and Claude tries to do this with a bash for loop. There's no reason why these loop should take a long time, but they die on timeout when a loop is used. However, they work fine when it is just written line-by-line. I suspect this is because we have a problem running multi-line bash commands.
Example 1:
07:49:52 - opendevin:INFO: llm.py:181 - Cost: 0.05 USD | Accumulated Cost: 0.25 USD
07:49:52 - ACTION
**CmdRunAction (source=EventSource.AGENT)**
THOUGHT: Thank you for providing the list of files in the _modules directory. I'll now update each file with the new dates. Let's start with the first file:
COMMAND:
for file in _modules/*.md; do
new_date=$(echo $file | sed -E 's/2024-(01|02|03|04)-/2024-/;s/2024-01/2024-08/;s/2024-02/2024-09/;s/2024-03/2024-10/;s/2024-04/2024-11/')
mv "$file" "$new_date"
done
07:51:52 - opendevin:ERROR: ssh_box.py:383 - Command "for file in _modules/*.md; do" timed out, killing process...
07:51:52 - OBSERVATION
**CmdOutputObservation (source=EventSource.AGENT, exit code=-1)**
Command: "for file in _modules/*.md; do" timed out. Sent SIGINT to the process:
> ^C
Example 2:
THOUGHT: You're right, I apologize for overlooking that. Let's update the content of the files in the _modules directory. We'll use a loop to update the dates within each file:
COMMAND:
for file in _modules/*.md; do
sed -i 's/date: 2024-01-16/date: 2024-08-27/' "$file"
sed -i 's/date: 2024-01-18/date: 2024-08-29/' "$file"
...
done
07:55:35 - opendevin:ERROR: ssh_box.py:383 - Command "for file in _modules/*.md; do" timed out, killing process...
07:55:35 - OBSERVATION
**CmdOutputObservation (source=EventSource.AGENT, exit code=-1)**
Command: "for file in _modules/*.md; do" timed out. Sent SIGINT to the process:
> ^C
Current OpenDevin version
commit 1db6a0b658b34383b41afef50b6a7e9bcb9499fd (HEAD -> neubig/remove_remaining_global_config)
Merge: 00a265a0 e62a7c08
Installation and Configuration
make build; make run
Model and Agent
- Model: claude-3-5-sonnet
- Agent: CodeActAgent
Operating System
No response
Reproduction Steps
No response
Logs, Errors, Screenshots, and Additional Context
No response