fix(agent): render denied_agents list in access error

The f-string only spanned the first fragment ('You don') so the
{chr(44).join(...)} placeholder leaked into chat output as literal
text. Build the message with plain string concat.
This commit is contained in:
Carlos Garcia
2026-04-24 23:25:58 -04:00
parent 18f2c91715
commit 27325bc140

View File

@@ -95,7 +95,8 @@ class MasterAgent:
status='awaiting_clarification')
access = await self._check_access(user_id, intent.agents)
if not access.allowed:
msg = f'You don' + chr(39) + 't have access to: {chr(44).join(access.denied_agents)}.'
denied = ', '.join(access.denied_agents)
msg = "You don't have access to: " + denied + '.'
await self._memory.append_message(user_id, 'assistant', msg, directive_id)
await self._log_directive_complete(directive_id, 'failed', msg)
return MasterResponse(directive_id=directive_id, response=msg, status='failed')