Feature: Agent Memory Lock and Operator Error Propagation As a developer I want agents to handle event loop edge cases and propagate operator errors correctly So that agent memory locks and streaming operators are robust under concurrent and error conditions Background: Given a fresh agents base final test context (abf) Scenario: AgentWithMemory _memory_lock handles RuntimeError from get_event_loop Given a fresh agents base final test context (abf) When I access _memory_lock from a thread with no event loop (abf) Then a new event loop should be created by _memory_lock (abf) Scenario: AgentWithMemory _memory_lock creates new loop when loop is closed Given a fresh agents base final test context (abf) When I access _memory_lock after closing the current event loop (abf) Then _memory_lock should create and set a new event loop (abf) Scenario: AgentWithMemory dispose clears lock and calls parent dispose Given a fresh agents base final test context (abf) When I dispose an AgentWithMemory instance (abf) Then _memory_lock_instance should be set to None (abf) And parent dispose should be called (abf) Scenario: StreamableAgent as_operator propagates on_error Given a fresh agents base final test context (abf) When I use as_operator with an error-producing source (abf) Then the error should propagate through on_error (abf) Scenario: StreamableAgent map_operator processes value through agent Given a fresh agents base final test context (abf) When I use map_operator in a pipeline with a value (abf) Then the value should be processed and result set on the future (abf) Scenario: StreamableAgent filter_operator applies condition to output Given a fresh agents base final test context (abf) When I use filter_operator with a condition and value (abf) Then the condition should be applied to agent output (abf)