# Agent still running an old post checkout hook command from a plugin

**URL:** <https://forum.buildkite.community/t/agent-still-running-an-old-post-checkout-hook-command-from-a-plugin/3280>\
**Category:** Elastic CI Stack for AWS\
**Created:** [October 5, 2023, 12:42am UTC](https://forum.buildkite.community/t/agent-still-running-an-old-post-checkout-hook-command-from-a-plugin/3280 "2023-10-05T00:42:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![farhan](https://avatars.discourse-cdn.com/v4/letter/f/b2d939/32.png) [@farhan](https://forum.buildkite.community/u/farhan)\
**Post date:** [October 5, 2023, 12:42am UTC](https://forum.buildkite.community/t/agent-still-running-an-old-post-checkout-hook-command-from-a-plugin/3280/1 "2023-10-05T00:42:38Z")

</div>

Even though post checkout hook command is changed in the plugin but some agents ran the new command but most of them executed the old hook command.

What would be the likely cause of it.

---

<div class="post-metadata">

**Author:** ![lizette](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/lizette/32/1161_2.png) [@lizette](https://forum.buildkite.community/u/lizette)\
**Post date:** [October 5, 2023, 1:14am UTC](https://forum.buildkite.community/t/agent-still-running-an-old-post-checkout-hook-command-from-a-plugin/3280/2 "2023-10-05T01:14:56Z")

</div>

Hi @farhan, this could most likely be caused by old hooks still available for the agent to execute locally. This can be avoided by forcing a clean checkout on steps using the plugin. You can read more about BUILDKITE\_CLEAN\_CHECKOUT [here](https://buildkite.com/docs/agent/v3/securing#forcing-clean-checkouts).

Let us know if that helps.

Cheers!
