-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
M18M18: Tool Orchestration EvolutionM18: Tool Orchestration EvolutioncorefeatureNew functionalityNew functionality
Description
Parent: #239 (Phase B)
Summary
Replace hardcoded MAX_SHELL_ITERATIONS = 3 with configurable limit (default 10) and add doom-loop detection.
Changes
crates/zeph-core/src/config.rs: addmax_tool_iterations: usizetoAgentConfig(default 10)crates/zeph-core/src/agent.rs: use config value instead of constant- Doom-loop detection: track last N tool outputs, break on 3 consecutive identical outputs/errors, notify user
- Per-iteration token budget check (stop if approaching context limit)
config/default.toml: add[agent] max_tool_iterations = 10- Env var override:
ZEPH_AGENT_MAX_TOOL_ITERATIONS
Acceptance criteria
- Iteration limit configurable via TOML + env var
- Default raised from 3 to 10
- Doom-loop detection breaks on 3 consecutive identical outputs
- Agent stops when context budget nears limit
- Existing tests updated
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
M18M18: Tool Orchestration EvolutionM18: Tool Orchestration EvolutioncorefeatureNew functionalityNew functionality