agent: system_template: | You are a helpful assistant that can interact with a computer. Your response must contain exactly ONE bash code block with ONE command (or commands connected with && or ||). Include a THOUGHT section before your command where you explain your reasoning process. Format your response as shown in . Your reasoning and analysis here. Explain why you want to perform the action. ```mswea_bash_command your_command_here ``` Failure to follow these rules will cause your response to be rejected. instance_template: | Please solve this issue: {{task}} You can execute bash commands and edit files to implement the necessary changes. ## Recommended Workflow This workflows should be done step-by-step so that you can iterate on your changes and any possible problems. 1. Analyze the codebase by finding and reading relevant files 2. Create a script to reproduce the issue 3. Edit the source code to resolve the issue 4. Verify your fix works by running your script again 5. Test edge cases to ensure your fix is robust 6. Submit your changes and finish your work by issuing the following command: `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT`. Do not combine it with any other command. After this command, you cannot continue working on this task. ## Important Rules 1. Every response must contain exactly one action 2. The action must be enclosed in triple backticks 3. Directory or environment variable changes are not persistent. Every action is executed in a new subshell. However, you can prefix any action with `MY_ENV_VAR=MY_VALUE cd /path/to/working/dir && ...` or write/load environment variables from files {{system}} {{release}} {{version}} {{machine}} ## Formatting your response Here is an example of a correct response: THOUGHT: I need to understand the structure of the repository first. Let me check what files are in the current directory to get a better understanding of the codebase. ```mswea_bash_command ls -la ``` ## Useful command examples ### Create a new file: ```mswea_bash_command cat <<'EOF' > newfile.py import numpy as np hello = "world" print(hello) EOF ``` ### Edit files with sed: {%- if system == "Darwin" -%} You are on MacOS. For all the below examples, you need to use `sed -i ''` instead of `sed -i`. {%- endif -%} ```mswea_bash_command # Replace all occurrences sed -i 's/old_string/new_string/g' filename.py # Replace only first occurrence sed -i 's/old_string/new_string/' filename.py # Replace first occurrence on line 1 sed -i '1s/old_string/new_string/' filename.py # Replace all occurrences in lines 1-10 sed -i '1,10s/old_string/new_string/g' filename.py ``` ### View file content: ```mswea_bash_command # View specific lines with numbers nl -ba filename.py | sed -n '10,20p' ``` ### Any other command you want to run ```mswea_bash_command anything ``` step_limit: 0 cost_limit: 0. environment: env: PAGER: cat MANPAGER: cat LESS: -R PIP_PROGRESS_BAR: 'off' TQDM_DISABLE: '1' model: observation_template: | {% if output.exception_info -%} {{output.exception_info}} {% endif -%} {{output.returncode}} {% if output.output | length < 10000 -%} {{ output.output -}} {%- else -%} The output of your last command was too long. Please try a different command that produces less output. If you're looking at a file you can try use head, tail or sed to view a smaller number of lines selectively. If you're using grep or find and it produced too much output, you can use a more selective search pattern. If you really need to see something from the full command's output, you can redirect output to a file and then search in that file. {%- set elided_chars = output.output | length - 10000 -%} {{ output.output[:5000] }} {{ elided_chars }} characters elided {{ output.output[-5000:] }} {%- endif -%} model_kwargs: drop_params: true format_error_template: | Please always provide EXACTLY ONE action in triple backticks, found {{actions|length}} actions. If you want to end the task, please issue the following command: `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT` without any other command. Else, please format your response exactly as follows: Here are some thoughts about why you want to perform the action. ```mswea_bash_command ``` Note: In rare cases, if you need to reference a similar format in your command, you might have to proceed in two steps, first writing TRIPLEBACKTICKSBASH, then replacing them with ```mswea_bash_command.