Skip to content

Commit 933db22

Browse files
committed
Minor config updates
1 parent 5835b2e commit 933db22

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

codeclash/agents/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from jinja2 import Template
55
from pydantic import BaseModel
66

7-
load_dotenv()
7+
load_dotenv(override=True)
88

99

1010
class GameContext(BaseModel):

codeclash/utils/yaml_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ def include_replacer(match):
2323
if prefix.strip() == "<<:":
2424
# For merge keys, include the content with proper indentation
2525
if indentation:
26+
# Merged content must be indented deeper than the `<<:` key itself, otherwise
27+
# the key gets a null scalar and PyYAML rejects the merge. (+2 spaces, matching
28+
# the no-indentation branch below.)
29+
content_indent = indentation + " "
2630
included_lines = included_content.splitlines()
27-
indented_lines = [indentation + line if line.strip() else line for line in included_lines]
31+
indented_lines = [content_indent + line if line.strip() else line for line in included_lines]
2832
return indentation + "<<:\n" + "\n".join(indented_lines)
2933
else:
3034
# Indent the included content by 2 spaces for proper merge format

configs/ablations/ladder/battlesnake_llama_smoke.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ player:
2020
name: opus-4-8
2121
branch_init: human/moxuz/pinky-snek
2222
config:
23-
agent: !include mini/default.yaml
23+
agent:
24+
<<: !include mini/default.yaml
25+
step_limit: 10 # smoke override: stop after 10 steps (cost cap disabled in default.yaml)
2426
model: !include mini/models/llama_opus_4_8.yaml
2527
push: True
2628
prompts:

configs/mini/default.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ instance_template: |
2323
The game is played in team rounds. You play one round, then a teammate takes over.
2424
You're scored on total team performance across all rounds.
2525
26-
Each round has {{step_limit}} steps and {{cost_limit}} dollar limits.
27-
After you've reached the step or cost limit, you cannot continue working on this task, and we will play the game with your codebase.
28-
We recommend submitting before you hit the limits to avoid losing work.
26+
Each round has a limit of {{step_limit}} steps.
27+
After you've reached the step limit, you cannot continue working on this task, and we will play the game with your codebase.
28+
We recommend submitting before you hit the limit to avoid losing work.
2929
3030
Each round starts fresh with no knowledge of previous actions.
3131
Leave tools, notes, and strategies in the codebase for teammates.
@@ -101,4 +101,4 @@ instance_template: |
101101
run exactly `echo COMPLETE_TASK_AND_SUBMIT_FINAL_OUTPUT` to submit your work.
102102
You cannot continue working in any way on this task after submitting.
103103
step_limit: 30
104-
cost_limit: 1.
104+
cost_limit: 0 # 0 disables the cost cap (see agents/default.py: limit applies only when >0); step_limit is the sole stop

0 commit comments

Comments
 (0)