# Adding an Agent Hook in Elastic CI

**URL:** <https://forum.buildkite.community/t/adding-an-agent-hook-in-elastic-ci/3969>\
**Category:** Elastic CI Stack for AWS\
**Created:** [October 15, 2024, 7:33pm UTC](https://forum.buildkite.community/t/adding-an-agent-hook-in-elastic-ci/3969 "2024-10-15T19:33:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peerallan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/peerallan/32/1537_2.png) [@peerallan](https://forum.buildkite.community/u/peerallan)\
**Post date:** [October 15, 2024, 7:33pm UTC](https://forum.buildkite.community/t/adding-an-agent-hook-in-elastic-ci/3969/1 "2024-10-15T19:33:21Z")

</div>

I thought I read in the docs somewhere ages ago that you can add additional agent hooks in your ElasticCI stack but for the life of me I can’t find it.

If we want to add a `pre-exit` hook to our agents without clobbering the one the stack comes with is there a way to do that? Or is it something we need to do on bootstrap?

Thanks

Peer

---

<div class="post-metadata">

**Author:** ![pete](https://avatars.discourse-cdn.com/v4/letter/p/3ab097/32.png) [@pete](https://forum.buildkite.community/u/pete)\
**Post date:** [October 17, 2024, 1:46pm UTC](https://forum.buildkite.community/t/adding-an-agent-hook-in-elastic-ci/3969/2 "2024-10-17T13:46:24Z")

</div>

Hi @peerallan ! Thanks for your question and welcome to the Buildkite Community Forum!

We’ve also received the email you sent to [support@buildkite.com](mailto:support@buildkite.com). We will follow-up with you there. Thanks!

Regards,  
Pete  
Senior Support Engineer  
Buildkite
