fix: strip <no-reply/> marker in sendToAgent before returning to callers (#584)

Co-authored-by: Letta Code <noreply@letta.com>
This commit is contained in:
Cameron
2026-03-12 21:37:53 -07:00
committed by GitHub
parent 9bd74227d9
commit 791e722fca

View File

@@ -1955,6 +1955,12 @@ export class LettaBot implements AgentSession {
} }
} }
// Strip <no-reply/> marker so callers (cron, webhooks) see empty string
if (response.trim() === '<no-reply/>') {
log.info('sendToAgent: agent responded with <no-reply/> marker, suppressing');
response = '';
}
if (isSilent && response.trim()) { if (isSilent && response.trim()) {
if (usedMessageCli || executedDirectives) { if (usedMessageCli || executedDirectives) {
log.info(`Silent mode: agent delivered via ${[usedMessageCli && 'CLI', executedDirectives && 'directives'].filter(Boolean).join(' + ')}, remaining text (${response.length} chars) not delivered`); log.info(`Silent mode: agent delivered via ${[usedMessageCli && 'CLI', executedDirectives && 'directives'].filter(Boolean).join(' + ')}, remaining text (${response.length} chars) not delivered`);