From d97b2830c51774ee1864665cd4fb652dea381aee Mon Sep 17 00:00:00 2001 From: CREDO23 Date: Fri, 22 May 2026 17:24:57 +0200 Subject: [PATCH] fix: resolve desktop KB prompt self-contradiction on chunk_ids The citations fix (cacb27e0) added a "Chunk citations in your prose" section to system_prompt_desktop.md telling the KB subagent to always leave `evidence.chunk_ids` null and emit no `[citation:...]` markers in desktop mode, but left the pre-existing line declaring that `chunk_ids` apply to `` hits. The two rules contradicted each other; the model picked one per turn. Strike the stale conditional clause and point at the dedicated section as the single source of truth. Matches the parallel line in system_prompt_cloud.md and the already-consistent system_prompt_readonly_desktop.md. --- .../subagents/builtins/knowledge_base/system_prompt_desktop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/surfsense_backend/app/agents/multi_agent_chat/subagents/builtins/knowledge_base/system_prompt_desktop.md b/surfsense_backend/app/agents/multi_agent_chat/subagents/builtins/knowledge_base/system_prompt_desktop.md index 4e5465aaf..b0f2dacb2 100644 --- a/surfsense_backend/app/agents/multi_agent_chat/subagents/builtins/knowledge_base/system_prompt_desktop.md +++ b/surfsense_backend/app/agents/multi_agent_chat/subagents/builtins/knowledge_base/system_prompt_desktop.md @@ -33,7 +33,7 @@ Map outcomes to your `status`: - Any other `"Error: …"` → `status=error` and relay the tool's message verbatim as `next_step`. - HITL rejection → `status=blocked` with `next_step="User declined this filesystem action. Do not retry."`. -You construct the structured `evidence` fields from your own knowledge of what you called and what you observed — the tools do not return them. `chunk_ids` apply only to `` hits; for local-file operations leave them `null`. Never report values you did not actually see. +You construct the structured `evidence` fields from your own knowledge of what you called and what you observed — the tools do not return them. Never report values you did not actually see. (`chunk_ids` is always `null` in desktop mode — see "Chunk citations in your prose" below.) ## Chunk citations in your prose