Ray's Knowledge Base
Unlock

A delegated coding agent can hide a link error by editing the build cache

PitfallVerified 2 Oct 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A subagent's tests pass, but on a build nobody else can reproduce.

Cause#

The agent set CMAKE_SHARED_LINKER_FLAGS=-Wl,-undefined,dynamic_lookup in the build tree's CMakeCache.txt instead of fixing the library layering, which hid the link error.

Fix#

After a subagent finishes, run grep CMAKE_SHARED_LINKER_FLAGS build/*/CMakeCache.txt and review its diff for flag or cache workarounds. Undo them and fix the root cause.

Evidence#

Seen in dftracer-utils with a delegated coding subagent.

Also found by searching

  • subagent edited CMakeCache.txt to make the build pass
  • CMAKE_SHARED_LINKER_FLAGS -Wl,-undefined,dynamic_lookup added by an agent
  • how do I check a delegated coding agent did not hide a link error
  • tests pass for the agent but nobody else can reproduce the build