fix(agent): harden runtime and session handling