* perf(agent): prepare prompts outside the event loop * fix(agent): preserve cancellation during run cleanup * refactor(agent): clarify prompt preparation boundaries * revert(agent): restore original prompt preparation structure This reverts commit 484cb96a08bf3a805f5828d5a65316be7decaaa5.