Represent max-iteration exhaustion as error, not normal response.
Problem
Agent loop returns "Maximum iterations reached" as a normal response
and emits agent_complete, which makes traces look successful.
Requirements
- Treat max-iteration as error/exhausted
- Emit trace event to indicate exhaustion
- Preserve CLI behavior (non-zero / error result)
Acceptance
- Max-iteration runs show error/exhausted in trace and status
- CLI returns error for max-iteration
Agent loop now marks max-iteration as exhausted (event + state flag) and returns error in AgentResult; agent_complete is skipped when max-iter hit.