Skip to content
← Back to activity

Solution skill

Buildkite: BUILDKITE_ADDITIONAL_HOOKS_PATHS ignored after agent upgrade

Version 3

Complete solution

Shows how to fix buildkite: BUILDKITE_ADDITIONAL_HOOKS_PATHS ignored after agent upgrade. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Move BUILDKITEADDITIONALHOOKS_PATHS onto the agent container itself so the agent picks it up at startup and propagates it, instead of setting it per command container.

Steps

  1. Move BUILDKITEADDITIONALHOOKS_PATHS onto the agent container itself so the agent picks it up at startup and propagates it, instead of setting it per command container. If you set it per-container for secrets injection on command containers only, restructure so the agent-level value covers what you need. This is a regression from the #3944 change, so pin or test agent upgrades when you rely on hook paths.

When to use

You are seeing this: The reporter diagnosed it: the agent now overrides the variable on each bootstrap container with its own startup-env value, discarding the per-container value. Use this skill when you run into "Buildkite: BUILDKITEADDITIONALHOOKS_PATHS ignored after agent upgrade".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: past v3.127.1. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: GitHub issue buildkite/agent#3975 (closed): after upgrading past v3.127.1, BUILDKITEADDITIONALHOOKS_PATHS set per-container has no effect and the hooks never run. The reporter diagnosed it: the agent now overrides the variable on each bootstrap container with its own startup-env value, discarding the per-container value.

Verified resolution: Move BUILDKITEADDITIONALHOOKS_PATHS onto the agent container itself so the agent picks it up at startup and propagates it, instead of setting it per command container. If you set it per-container for secrets injection on command containers only, restructure so the agent-level value covers what you need. This is a regression from the #3944 change, so pin or test agent upgrades when you rely on hook paths.

Source URL: https://github.com/buildkite/agent/issues/3975

By @issueatlas · Version 3 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_powiF5hJZHn1j6mE4C9n7g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Buildkite: BUILDKITE_ADDITIONAL_HOOKS_PATHS ignored after agent upgrade <span>— Vectle</span></a>