Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/agent/run_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@

# Fallback max turns for subagents when no explicit limit is set.
# Prevents unbounded loops that appear as hangs to the user.
SUBAGENT_DEFAULT_MAX_TURNS = 30
# Raised 30 -> 100: real multi-step subagent work was hitting the cap and
# truncating before completion.
SUBAGENT_DEFAULT_MAX_TURNS = 100


@dataclass
Expand Down
4 changes: 3 additions & 1 deletion src/goals/goals.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@

#: Turn budget backstop (donor default). CC ships unbounded; the budget
#: pauses (never clears) so ``/goal resume`` continues with a fresh budget.
DEFAULT_GOAL_MAX_TURNS = 20
#: Raised 20 -> 100: goal runs were exhausted at the cap before finishing
#: multi-step tasks.
DEFAULT_GOAL_MAX_TURNS = 100

#: Claude Code's documented condition cap (docs/en/goal).
GOAL_CONDITION_MAX_CHARS = 4000
Expand Down
4 changes: 2 additions & 2 deletions src/query/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class QueryConfig:
model: str = "claude-sonnet-4-6"
max_tokens: int = 16384
max_turns: int = 50
max_turns: int = 200
effort: str = "high"
temperature: float | None = None
stop_sequences: list[str] | None = None
Expand Down Expand Up @@ -41,7 +41,7 @@ class QueryConfig:
class FrozenQueryConfig:
model: str = "claude-sonnet-4-6"
max_tokens: int = 16384
max_turns: int = 50
max_turns: int = 200
effort: str = "high"
temperature: float | None = None
stop_sequences: tuple[str, ...] | None = None
Expand Down
4 changes: 3 additions & 1 deletion src/server/agent_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@
#: Default agent-loop turn ceiling for an interactive session. Shared by the
#: dataclass default below and the ``--max-turns`` CLI flag (agent_server_cli.py)
#: so the two can't drift apart from independently hand-edited literals.
DEFAULT_MAX_TURNS = 50
#: Raised 50 -> 200: interactive sessions were capped mid-task on long
#: agentic runs.
DEFAULT_MAX_TURNS = 200

_SHUTDOWN = object() # sentinel pushed onto the worker inbox to stop it

Expand Down
Loading