refactor(agent-manager): add error logging for agent prompt refusal

This commit is contained in:
Mohamed Boudra
2025-10-26 09:52:43 +01:00
parent fdaf403f13
commit 7fee9d4dc4
2 changed files with 5 additions and 1 deletions
@@ -417,6 +417,10 @@ export class AgentManager {
stopReason: response.stopReason,
};
} else if (response.stopReason === "refusal") {
console.error(
`[Agent ${agentId}] Agent refused to process the prompt`,
response
);
agent.state = {
type: "failed",
lastError: "Agent refused to process the prompt",