Browse Source

refactor remind_iterations (#1760)

* refactor remind_iterations

* regenerate tests

* concatenate iteration message

* fix merge issues

* update integration tests
Robert Brennan 1 year ago
parent
commit
82a798990c

+ 6 - 2
agenthub/codeact_agent/codeact_agent.py

@@ -1,5 +1,4 @@
 import re
-from typing import Mapping
 
 from agenthub.codeact_agent.prompt import EXAMPLES, SYSTEM_MESSAGE
 from opendevin.controller.agent import Agent
@@ -152,7 +151,7 @@ class CodeActAgent(Agent):
         Resets the CodeAct Agent.
         """
         super().reset()
-        self.messages: list[Mapping[str, str]] = [
+        self.messages: list[dict[str, str]] = [
             {'role': 'system', 'content': SYSTEM_MESSAGE},
             {
                 'role': 'user',
@@ -221,6 +220,11 @@ class CodeActAgent(Agent):
                     raise NotImplementedError(
                         f'Unknown observation type: {obs.__class__}'
                     )
+        latest_user_message = [m for m in self.messages if m['role'] == 'user'][-1]
+        if latest_user_message:
+            latest_user_message['content'] += (
+                f'\n\nENVIRONMENT REMINDER: You have {state.max_iterations - state.iteration - 1} turns left to complete the task.'
+            )
 
         response = self.llm.completion(
             messages=self.messages,

+ 0 - 19
opendevin/controller/agent_controller.py

@@ -61,7 +61,6 @@ class AgentController:
         max_chars: int = MAX_CHARS,
         inputs: dict | None = None,
         sandbox: Optional[Sandbox] = None,
-        remind_iterations: bool = config.remind_iterations,
     ):
         """Initializes a new instance of the AgentController class.
 
@@ -73,7 +72,6 @@ class AgentController:
             max_chars: The maximum number of characters the agent can output.
             inputs: The initial inputs to the agent.
             sandbox: An optional initialized sandbox to run the agent in. If not provided, a default sandbox will be created based on config.
-            remind_iterations: A boolean value indicating whether to remind the agent its remaining budget of interaction.
         """
         self.id = sid
         self.agent = agent
@@ -84,11 +82,6 @@ class AgentController:
         )
         self.max_iterations = max_iterations
 
-        self.remind_iterations = remind_iterations
-        if self.remind_iterations:
-            logger.info(
-                'Iteration reminder is ENABLED: agent will be reminded of remaining turns.'
-            )
         self.runtime = ServerRuntime(sandbox=sandbox, sid=self.id)
         self.max_chars = max_chars
 
@@ -225,17 +218,6 @@ class AgentController:
             inputs=action.inputs,
         )
 
-    def add_iteration_reminder_when_needed(self, i: int, obs: Observation):
-        """Add iteration reminder to the observation if needed.
-
-        Args:
-            i: The current iteration number (0-indexed).
-            obs: The observation to add the reminder to.
-        """
-        if self.remind_iterations:
-            obs.content += f'\n\nENVIRONMENT REMINDER: You have {self.max_iterations - i - 1} turns left to complete the task.'
-        return obs
-
     async def step(self, i: int) -> bool:
         if self.delegate is not None:
             delegate_done = await self.delegate.step(i)
@@ -290,7 +272,6 @@ class AgentController:
         elif not isinstance(observation, ErrorObservation):
             observation = await self.runtime.run_action(action)
 
-        observation = self.add_iteration_reminder_when_needed(i, observation)
         if not isinstance(observation, NullObservation):
             logger.info(observation, extra={'msg_type': 'OBSERVATION'})
         await self.add_history(action, observation)

+ 1 - 0
opendevin/controller/state/state.py

@@ -15,6 +15,7 @@ from opendevin.events.observation import (
 class State:
     root_task: RootTask = field(default_factory=RootTask)
     iteration: int = 0
+    max_iterations: int = 100
     # number of characters we have sent to and received from LLM so far for current task
     num_of_chars: int = 0
     background_commands_obs: list[CmdOutputObservation] = field(default_factory=list)

+ 0 - 1
opendevin/core/config.py

@@ -82,7 +82,6 @@ class AppConfig(metaclass=Singleton):
     )
     run_as_devin: bool = True
     max_iterations: int = 100
-    remind_iterations: bool = False
     e2b_api_key: str = ''
     sandbox_type: str = 'ssh'  # Can be 'ssh', 'exec', or 'e2b'
     use_host_network: bool = False

+ 2 - 0
tests/integration/mock/CodeActAgent/test_edits/prompt_001.log

@@ -219,3 +219,5 @@ NOW, LET'S START!
 ----------
 
 Fix typos in bad.txt. Do not ask me for confirmation at any point.
+
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.

+ 5 - 3
tests/integration/mock/CodeActAgent/test_edits/prompt_002.log

@@ -220,9 +220,11 @@ NOW, LET'S START!
 
 Fix typos in bad.txt. Do not ask me for confirmation at any point.
 
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.
+
 ----------
 
-Let's start by examining the contents of `bad.txt` to identify the typos. I'll display the content first.
+To fix typos in a file without asking for confirmation, we can use the `sed` command in bash to replace the typos. Let's go ahead and fix the typos in `bad.txt` without any confirmation prompts.
 
 <execute_bash>
 cat bad.txt
@@ -235,6 +237,6 @@ This is a stupid typoo.
 Really?
 No mor typos!
 Enjoy!
-
-ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
 [Command -1 finished with exit code 0]]
+
+ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

+ 10 - 17
tests/integration/mock/CodeActAgent/test_edits/prompt_003.log

@@ -220,9 +220,11 @@ NOW, LET'S START!
 
 Fix typos in bad.txt. Do not ask me for confirmation at any point.
 
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.
+
 ----------
 
-Let's start by examining the contents of `bad.txt` to identify the typos. I'll display the content first.
+To fix typos in a file without asking for confirmation, we can use the `sed` command in bash to replace the typos. Let's go ahead and fix the typos in `bad.txt` without any confirmation prompts.
 
 <execute_bash>
 cat bad.txt
@@ -235,32 +237,23 @@ This is a stupid typoo.
 Really?
 No mor typos!
 Enjoy!
-
-ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
 [Command -1 finished with exit code 0]]
 
-----------
+ENVIRONMENT REMINDER: You have 98 turns left to complete the task.
 
-I've identified the typos in the file. Here are the corrections:
-- "typoo" should be "typo"
-- "mor" should be "more"
+----------
 
-I will now proceed to correct these typos in `bad.txt`.
+Great! Let's use the `sed` command to fix the typos in the `bad.txt` file without any confirmation prompts.
 
 <execute_bash>
-edit 1:1
-This is a stupid typo.
-end_of_edit
-edit 3:3
-No more typos!
-end_of_edit
+sed -i 's/typoo/typo/g' bad.txt
+sed -i 's/mor/more/g' bad.txt
 </execute_bash>
 
 ----------
 
 OBSERVATION:
-> > No file open. Use the `open` command first.
-> > No file open. Use the `open` command first.
 
-ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
 [Command -1 finished with exit code 0]]
+
+ENVIRONMENT REMINDER: You have 97 turns left to complete the task.

+ 0 - 304
tests/integration/mock/CodeActAgent/test_edits/prompt_004.log

@@ -1,304 +0,0 @@
-
-
-----------
-
-A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
-The assistant can interact with an interactive Python (Jupyter Notebook) environment and receive the corresponding output when needed. The code should be enclosed using "<execute_ipython>" tag, for example:
-<execute_ipython>
-print("Hello World!")
-</execute_ipython>
-The assistant can execute bash commands on behalf of the user by wrapping them with <execute_bash> and </execute_bash>.
-For example, you can list the files in the current directory by <execute_bash> ls </execute_bash>.
-The assistant should attempt fewer things at a time instead of putting too much commands OR code in one "execute" block.
-The assistant can install Python packages through bash by <execute_bash> pip install [package needed] </execute_bash> and should always import packages and define variables before starting to use them.
-The assistant should stop <execute> and provide an answer when they have already obtained the answer from the execution result.
-If the assistant encounters an import error in IPython for a newly installed package, they should try to restart the kernel and import the package again. IPython kernel can be re-started by:
-<execute_ipython>
-import IPython
-IPython.Application.instance().kernel.do_shutdown(True)  # Restart the kernel
-</execute_ipython>
-
-
-Apart from the standard bash commands, you can also use the following special commands in <execute_bash> environment:
-open <path> [<line_number>] - opens the file at the given path in the editor. If line_number is provided, the window will be move to include that line
-goto <line_number> - moves the window to show <line_number>
-scroll_down - moves the window down {WINDOW} lines
-scroll_up - moves the window down {WINDOW} lines
-create <filename> - creates and opens a new file with the given name
-search_dir <search_term> [<dir>] - searches for search_term in all files in dir. If dir is not provided, searches in the current directory
-search_file <search_term> [<file>] - searches for search_term in file. If file is not provided, searches in the current open file
-find_file <file_name> [<dir>] - finds all files with the given name in dir. If dir is not provided, searches in the current directory
-edit <start_line>:<end_line>
-<replacement_text>
-end_of_edit - replaces lines <start_line> through <end_line> (inclusive) with the given text in the open file. The replacement text is terminated by a line with only end_of_edit on it. All of the <replacement text> will be entered, so make sure your indentation is formatted properly. Python files will be checked for syntax errors after the edit. If the system detects a syntax error, the edit will not be executed. Simply try to edit the file again, but make sure to read the error message and modify the edit command you issue accordingly. Issuing the same command a second time will just lead to the same error message again. Remember, the file must be open before editing.
-Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION. If you'd like to add the line '        print(x)' you must fully write that out, with all those spaces before the code! Indentation is important and code that is not indented correctly will fail and require fixing before it can be run.
-
-The assistant's response should be concise, but do express their thoughts.
-Try to include one of <execute_ipython> or <execute_bash> in each of your responses, unless it is a direct answer to a question OR a message to the user.
-IMPORTANT: Whenever possible, execute the code for the user using <execute_ipython> or <execute_bash> instead of providing it.
-
-
-----------
-
-Here is an example of how you can interact with the environment for task solving:
-
---- START OF EXAMPLE ---
-
-USER: Can you create a list of numbers from 1 to 10, and create a web page to display them at port 5000?
-
-ASSISTANT:
-Sure! Let me write the Python code for starting a web server and save it to a file `app.py`:
-<execute_ipython>
-CODE='''
-from flask import Flask
-app = Flask(__name__)
-
-@app.route('/')
-def index():
-    numbers = list(range(1, 11))
-    return str(numbers)
-
-if __name__ == '__main__':
-    app.run(port=5000)
-'''
-with open('app.py', 'w') as f:
-    f.write(CODE)
-</execute_ipython>
-
-USER:
-Observation:
-[Code executed successfully with no output]
-
-ASSISTANT:
-I have created a Python file `app.py` that will display a list of numbers from 1 to 10 when you run it. Let me run the Python file for you:
-<execute_bash>
-python3 app.py > server.log 2>&1 &
-</execute_bash>
-
-USER:
-Observation:
-[1] 121[1]+  Exit 1                  python3 app.py > server.log 2>&1
-
-ASSISTANT: Looks like the server is running with PID 121 then crashed. Let me check the server log:
-<execute_bash>
-cat server.log
-</execute_bash>
-
-USER:
-Observation:
-Traceback (most recent call last):
-  File "/workspace/app.py", line 2, in <module>
-    from flask import Flask
-ModuleNotFoundError: No module named 'flask'
-
-ASSISTANT:
-It seems that Flask is not installed. Let me install Flask for you:
-<execute_bash>
-pip install flask
-</execute_bash>
-
-USER:
-Observation:
-Defaulting to user installation because normal site-packages is not writeable
-Collecting flask
-  Using cached flask-3.0.3-py3-none-any.whl (101 kB)
-Collecting blinker>=1.6.2
-  Using cached blinker-1.7.0-py3-none-any.whl (13 kB)
-Collecting Werkzeug>=3.0.0
-  Using cached werkzeug-3.0.2-py3-none-any.whl (226 kB)
-Collecting click>=8.1.3
-  Using cached click-8.1.7-py3-none-any.whl (97 kB)
-Collecting itsdangerous>=2.1.2
-  Using cached itsdangerous-2.2.0-py3-none-any.whl (16 kB)
-Requirement already satisfied: Jinja2>=3.1.2 in /home/opendevin/.local/lib/python3.10/site-packages (from flask) (3.1.3)
-Requirement already satisfied: MarkupSafe>=2.0 in /home/opendevin/.local/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask) (2.1.5)
-Installing collected packages: Werkzeug, itsdangerous, click, blinker, flask
-Successfully installed Werkzeug-3.0.2 blinker-1.7.0 click-8.1.7 flask-3.0.3 itsdangerous-2.2.0
-
-ASSISTANT:
-Now that Flask is installed, let me run the Python file again:
-<execute_bash>
-python3 app.py > server.log 2>&1 &
-</execute_bash>
-
-USER:
-Observation:
-[1] 124
-
-ASSISTANT:
-Let me check the server log again:
-<execute_bash>
-cat server.log
-</execute_bash>
-
-USER:
-Observation:
-* Serving Flask app 'app'
- * Debug mode: off
-WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
- * Running on http://127.0.0.1:5000
-Press CTRL+C to quit
-
-ASSISTANT:
-The server is running on port 5000 with PID 124. You can access the list of numbers by visiting http://127.0.0.1:5000. If you have any further questions, feel free to ask!
-
-USER: Now kill the server, make it display the numbers in a table format.
-
-ASSISTANT:
-Sure! Let me stop the server first:
-<execute_bash>
-kill 124
-</execute_bash>
-
-USER:
-Observation:
-[1]+  Terminated              python3 app.py > server.log 2>&1
-
-ASSISTANT:
-The server has been stopped. Let me open the Python file and modify it.
-<execute_bash>
-open app.py
-</execute_bash>
-
-USER:
-[File: /workspace/app.py (11 lines total)]
-1:
-2:from flask import Flask
-3:app = Flask(__name__)
-4:
-5:@app.route('/')
-6:def index():
-7:    numbers = list(range(1, 11))
-8:    return str(numbers)
-9:
-10:if __name__ == '__main__':
-11:    app.run(port=5000)
-
-ASSISTANT:
-I should edit the file to display the numbers in a table format. I should include correct indentation. Let me update the file:
-<execute_bash>
-edit 8:8
-    return '<table>' + ''.join([f'<tr><td>{i}</td></tr>' for i in numbers]) + '</table>'
-end_of_edit
-</execute_bash>
-
-USER:
-Observation:
-[File: /workspace/app.py (11 lines total)]
-1:
-2:from flask import Flask
-3:app = Flask(__name__)
-4:
-5:@app.route('/')
-6:def index():
-7:    numbers = list(range(1, 11))
-8:    return '<table>' + ''.join([f'<tr><td>{i}</td></tr>' for i in numbers]) + '</table>'
-9:
-10:if __name__ == '__main__':
-11:    app.run(port=5000)
-File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
-
-ASSISTANT:
-The file has been updated. Let me run the Python file again with the new changes:
-<execute_bash>
-python3 app.py > server.log 2>&1 &
-</execute_bash>
-
-USER:
-Observation:
-[1] 126
-
-ASSISTANT:
-The server is running on port 5000 with PID 126. You can access the list of numbers in a table format by visiting http://127.0.0.1:5000. Free free to let me know if you have any further requests!
-
---- END OF EXAMPLE ---
-
-
-NOW, LET'S START!
-
-----------
-
-Fix typos in bad.txt. Do not ask me for confirmation at any point.
-
-----------
-
-Let's start by examining the contents of `bad.txt` to identify the typos. I'll display the content first.
-
-<execute_bash>
-cat bad.txt
-</execute_bash>
-
-----------
-
-OBSERVATION:
-This is a stupid typoo.
-Really?
-No mor typos!
-Enjoy!
-
-ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
-[Command -1 finished with exit code 0]]
-
-----------
-
-I've identified the typos in the file. Here are the corrections:
-- "typoo" should be "typo"
-- "mor" should be "more"
-
-I will now proceed to correct these typos in `bad.txt`.
-
-<execute_bash>
-edit 1:1
-This is a stupid typo.
-end_of_edit
-edit 3:3
-No more typos!
-end_of_edit
-</execute_bash>
-
-----------
-
-OBSERVATION:
-> > No file open. Use the `open` command first.
-> > No file open. Use the `open` command first.
-
-ENVIRONMENT REMINDER: You have 8 turns left to complete the task.
-[Command -1 finished with exit code 0]]
-
-----------
-
-It seems I forgot to open the file before attempting to edit it. Let me open `bad.txt` and then proceed with the corrections.
-
-<execute_bash>
-open bad.txt
-edit 1:1
-This is a stupid typo.
-end_of_edit
-edit 3:3
-No more typos!
-end_of_edit
-</execute_bash>
-
-----------
-
-OBSERVATION:
-[File: /workspace/bad.txt (4 lines total)]
-1:This is a stupid typoo.
-2:Really?
-3:No mor typos!
-4:Enjoy!
-> > [File: /workspace/bad.txt (4 lines total)]
-1:This is a stupid typo.
-2:Really?
-3:No mor typos!
-4:Enjoy!
-File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
-> > [File: /workspace/bad.txt (4 lines total)]
-1:This is a stupid typo.
-2:Really?
-3:No more typos!
-4:Enjoy!
-File updated. Please review the changes and make sure they are correct (correct indentation, no duplicate lines, etc). Edit the file again if necessary.
-
-ENVIRONMENT REMINDER: You have 7 turns left to complete the task.
-[Command -1 finished with exit code 0]]

+ 1 - 1
tests/integration/mock/CodeActAgent/test_edits/response_001.log

@@ -1,4 +1,4 @@
-Let's start by examining the contents of `bad.txt` to identify the typos. I'll display the content first.
+To fix typos in a file without asking for confirmation, we can use the `sed` command in bash to replace the typos. Let's go ahead and fix the typos in `bad.txt` without any confirmation prompts.
 
 <execute_bash>
 cat bad.txt

+ 3 - 11
tests/integration/mock/CodeActAgent/test_edits/response_002.log

@@ -1,13 +1,5 @@
-I've identified the typos in the file. Here are the corrections:
-- "typoo" should be "typo"
-- "mor" should be "more"
-
-I will now proceed to correct these typos in `bad.txt`.
+Great! Let's use the `sed` command to fix the typos in the `bad.txt` file without any confirmation prompts.
 
 <execute_bash>
-edit 1:1
-This is a stupid typo.
-end_of_edit
-edit 3:3
-No more typos!
-end_of_edit
+sed -i 's/typoo/typo/g' bad.txt
+sed -i 's/mor/more/g' bad.txt

+ 1 - 10
tests/integration/mock/CodeActAgent/test_edits/response_003.log

@@ -1,10 +1 @@
-It seems I forgot to open the file before attempting to edit it. Let me open `bad.txt` and then proceed with the corrections.
-
-<execute_bash>
-open bad.txt
-edit 1:1
-This is a stupid typo.
-end_of_edit
-edit 3:3
-No more typos!
-end_of_edit
+The typos in the `bad.txt` file have been successfully fixed. If you need further assistance or have any more tasks, feel free to let me know!

+ 0 - 8
tests/integration/mock/CodeActAgent/test_edits/response_004.log

@@ -1,8 +0,0 @@
-The typos in `bad.txt` have been successfully corrected. Here's the final content of the file:
-
-1. This is a stupid typo.
-2. Really?
-3. No more typos!
-4. Enjoy!
-
-The task is completed. If you have any more requests or need further assistance, feel free to let me know!

+ 2 - 0
tests/integration/mock/CodeActAgent/test_ipython/prompt_001.log

@@ -219,3 +219,5 @@ NOW, LET'S START!
 ----------
 
 Use Jupyter IPython to write a text file containing 'hello world' to '/workspace/test.txt'. Do not ask me for confirmation at any point.
+
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.

+ 5 - 2
tests/integration/mock/CodeActAgent/test_ipython/prompt_002.log

@@ -220,9 +220,12 @@ NOW, LET'S START!
 
 Use Jupyter IPython to write a text file containing 'hello world' to '/workspace/test.txt'. Do not ask me for confirmation at any point.
 
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.
+
 ----------
 
-I will write the text 'hello world' to a file named 'test.txt' in the '/workspace' directory without asking for confirmation. Let me execute the code to create the file:
+To write 'hello world' to a text file named 'test.txt' in the '/workspace' directory without asking for confirmation, I will execute the following Python code:
+
 <execute_ipython>
 with open('/workspace/test.txt', 'w') as f:
     f.write('hello world')
@@ -233,4 +236,4 @@ with open('/workspace/test.txt', 'w') as f:
 OBSERVATION:
 [Code executed successfully with no output]
 
-ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
+ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

+ 2 - 1
tests/integration/mock/CodeActAgent/test_ipython/response_001.log

@@ -1,4 +1,5 @@
-I will write the text 'hello world' to a file named 'test.txt' in the '/workspace' directory without asking for confirmation. Let me execute the code to create the file:
+To write 'hello world' to a text file named 'test.txt' in the '/workspace' directory without asking for confirmation, I will execute the following Python code:
+
 <execute_ipython>
 with open('/workspace/test.txt', 'w') as f:
     f.write('hello world')

+ 1 - 1
tests/integration/mock/CodeActAgent/test_ipython/response_002.log

@@ -1 +1 @@
-The text file 'test.txt' with the content 'hello world' has been successfully created in the '/workspace' directory. If you have any more tasks or questions, feel free to let me know!
+The text file 'test.txt' containing 'hello world' has been successfully created in the '/workspace' directory. If you need any further assistance or have any more tasks in mind, feel free to let me know!

+ 2 - 0
tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_001.log

@@ -219,3 +219,5 @@ NOW, LET'S START!
 ----------
 
 Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
+
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.

+ 7 - 7
tests/integration/mock/CodeActAgent/test_write_simple_script/prompt_002.log

@@ -220,20 +220,20 @@ NOW, LET'S START!
 
 Write a shell script 'hello.sh' that prints 'hello'. Do not ask me for confirmation at any point.
 
+ENVIRONMENT REMINDER: You have 99 turns left to complete the task.
+
 ----------
 
-Sure! I will create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. Let me write the script for you:
+I will create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. Let's proceed with creating the script:
+
 <execute_bash>
-cat > hello.sh << 'EOF'
-#!/bin/bash
-echo "hello"
-EOF
+echo "echo 'hello'" > hello.sh
 </execute_bash>
 
 ----------
 
 OBSERVATION:
-> > >
 
-ENVIRONMENT REMINDER: You have 9 turns left to complete the task.
 [Command -1 finished with exit code 0]]
+
+ENVIRONMENT REMINDER: You have 98 turns left to complete the task.

+ 3 - 5
tests/integration/mock/CodeActAgent/test_write_simple_script/response_001.log

@@ -1,6 +1,4 @@
-Sure! I will create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. Let me write the script for you:
+I will create a shell script named 'hello.sh' that prints 'hello' without asking for confirmation. Let's proceed with creating the script:
+
 <execute_bash>
-cat > hello.sh << 'EOF'
-#!/bin/bash
-echo "hello"
-EOF
+echo "echo 'hello'" > hello.sh

+ 1 - 1
tests/integration/mock/CodeActAgent/test_write_simple_script/response_002.log

@@ -1 +1 @@
-The shell script 'hello.sh' has been successfully created. You can run it to see the output "hello". If you have any more requests or questions, feel free to ask!
+The shell script 'hello.sh' has been successfully created. You can run this script to print 'hello'. If you have any more tasks or questions, feel free to let me know!

+ 1 - 1
tests/integration/regenerate.sh

@@ -65,7 +65,6 @@ for ((i = 0; i < num_of_tests; i++)); do
 
   for ((j = 0; j < num_of_agents; j++)); do
     agent=${agents[j]}
-    remind_iterations=${remind_iterations_config[j]}
 
     # skip other agents if only one agent is specified
     if [[ -n "$ONLY_TEST_AGENT" && "$ONLY_TEST_AGENT" != "$agent" ]]; then
@@ -109,6 +108,7 @@ for ((i = 0; i < num_of_tests; i++)); do
         SANDBOX_TYPE=$SANDBOX_TYPE \
         WORKSPACE_BASE=$WORKSPACE_BASE \
         DEBUG=true \
+        WORKSPACE_MOUNT_PATH=$WORKSPACE_MOUNT_PATH AGENT=$agent \
         REMIND_ITERATIONS=$remind_iterations \
         WORKSPACE_MOUNT_PATH=$WORKSPACE_MOUNT_PATH \
         AGENT=$agent \