fix: avoid re-using `AuthInstanceID` for sub agents (#22196) by DanielleMaywood · Pull Request #22212 · coder/coder

@DanielleMaywood

Parent agents were re-using AuthInstanceID when spawning child agents.
This caused GetWorkspaceAgentByInstanceID to return the most recently
created sub agent instead of the parent when the parent tried to refetch
its own manifest.

Fix by not reusing AuthInstanceID for sub agents, and updating
GetWorkspaceAgentByInstanceID to filter them out entirely.

mafredri

@f0ssel f0ssel deleted the danielle/cherry-2.29/gh-22196 branch

February 23, 2026 22:37