code: func (a *Agent) Err(ctx context.Context) error {
  	select {
  	case <-a.closed:
  		return a.err
  	case <-ctx.Done():
  		return ctx.Err()
  	}
  }
docs: // Err returns the error that caused the agent to shutdown or nil. Err blocks
  // until the agent is fully shutdown.