container: coordinate shutdown with agent