You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent.get() returns undefined without error handling, causing crash #9437
Agent.get() returns undefined when an agent doesn't exist, but callers like createUserMessage() don't handle this case, causing a crash:
TypeError: undefined is not an object (evaluating 'agent.name')
at createUserMessage (src/session/prompt.ts:831:14)
The issue is in src/agent/agent.ts line 246-248:
exportasyncfunctionget(agent: string){returnstate().then((x)=>x[agent])// Returns undefined if not found}
And src/session/prompt.ts line 825, 833:
constagent=awaitAgent.get(input.agent??(awaitAgent.defaultAgent()))// ...agent: agent.name,// Crashes here when agent is undefined
This can be triggered by any caller passing an invalid agent name - in my case, it was the plannotator plugin defaulting to "build" when I had that agent disabled.
Activity
github-actions commentedon Jan 19, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rcdailey commentedon Jan 21, 2026
@rekram1-node duplicate of what issue specifically?