Problem
In sdk/python/src/ecp/server.py, _handle_reset runs the hook if one is registered and returns true either way:
def _handle_reset():
method_name = _HOOKS["reset"]
if method_name:
handler = getattr(_CURRENT_AGENT_INSTANCE, method_name)
_invoke_handler(handler)
return True
An agent with no @on_reset claims a successful reset. Scenario isolation silently does not happen, and state leaks between scenarios while the runtime believes it was cleared.
Proposal
Tie this to the reset capability (#TBD). Agents without the hook stop declaring reset, and the runtime warns on multi-scenario runs instead of being lied to.
Acceptance criteria
Problem
In
sdk/python/src/ecp/server.py,_handle_resetruns the hook if one is registered and returnstrueeither way:An agent with no @on_reset claims a successful reset. Scenario isolation silently does not happen, and state leaks between scenarios while the runtime believes it was cleared.
Proposal
Tie this to the reset capability (#TBD). Agents without the hook stop declaring reset, and the runtime warns on multi-scenario runs instead of being lied to.
Acceptance criteria