Open
Conversation
Author
|
@lxowalle @Zhaoyikaiii — tagging per CONTRIBUTING.md reviewer list for agent changes. |
b8d38f8 to
bdba1fb
Compare
When silent_processing is true in agents.defaults, the agent runs fully (tool calls, memory writes) but suppresses the empty-response fallback when the LLM produces no text. The channel layer skips sending empty content, so nothing reaches the user. Explicit LLM text is sent as normal. Also skips writing empty assistant messages to session history, which would cause provider errors on the next turn.
When silent_processing is true in agents.defaults, the agent runs fully on every message (tool calls execute, session is flushed to disk) but suppresses the empty-response fallback when the LLM produces no text. The channel layer already skips sending empty content, so nothing reaches the user. Explicit LLM text responses are sent as normal. Empty assistant messages are not written to session history to avoid provider errors on the next turn. The session itself is always saved so the user message is not lost from history on silent turns. Both the empty-response fallback and the tool-iteration-limit message are suppressed in silent mode — a background observer agent must not surface internal diagnostics to the channel.
bdba1fb to
a2aff99
Compare
|
@ufobat Hi! This PR has been inactive for over a week. If there's no update in the next 7 days, it will be closed automatically. If you're still working on it, just leave a comment to keep it open! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds
silent_processingtoagents.defaults. When enabled, the agent processes every inbound message fully — tool calls execute, session history is written — but if the LLM produces no text output, no message is sent to the channel. The automatic empty-response fallback ("The model returned an empty response...") is suppressed. Explicit LLM text responses are sent as normal.This enables observer agents that monitor group conversations and perform background work (e.g.
write_filecalls to maintain memory) without producing chat noise on every silent turn.Type of Change
🤖 AI Code Generation
Related Issue
Closes #2126
Technical Context
PicoClaw's
processOptions.DefaultResponsewas already a string field, always set to the hardcoded constant. This PR makes the value conditional on a newAgentDefaults.SilentProcessingflag — when true,DefaultResponseis"". The existing guardif finalContent == "" && ts.opts.DefaultResponse != ""then leavesfinalContentempty, andpublishResponseIfNeededalready has an early-return for empty strings.Two session history fixes: the assistant message write is gated on
finalContent != ""to avoid writing empty assistant messages (which cause provider errors on the next turn); theSession.Savecall is separated from the assistant write so the session is always flushed to disk — without this, user messages added to the in-memory session during a silent turn would be lost on restart.Both the empty-response fallback and the tool-iteration-limit message are suppressed in silent mode. This is intentional: a background observer agent must not surface internal diagnostics to the channel.
Test Environment
memory/MEMORY.mdviawrite_fileon each group message; no response appears in Telegram when LLM produces no text outputEvidence
Config used for verification:
{ "agents": { "defaults": { "silent_processing": true } } }Checklist
make checkdocs/configuration.md(new section with group observer pattern),docs/chat-apps.md(silent observer example); both clarify the distinction betweensilent_processingandgroup_trigger.mention_onlysilent_processingdefaults tofalse)main