mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-30 05:24:50 +02:00
[eric] agents: hidden harness messages self-identify, so a misfired nudge can never become 'the user told me to stop' (field report)
This commit is contained in:
@@ -114,6 +114,12 @@ class Messaging(AgentManagerProtocol):
|
||||
"session": session.model_dump(mode="json"),
|
||||
})
|
||||
|
||||
# Hidden messages are harness plumbing (nudges, lost-step retries, auth heals) but ride the
|
||||
# USER role, so agents stopped mid-task by a misfired nudge truthfully reported "the user
|
||||
# told me to stop", and others read them as prompt injection (field reports, 2026-08-16).
|
||||
# One attribution prefix at the one send chokepoint keeps every explanation honest.
|
||||
if hidden and prompt and not prompt.startswith("[Automated"):
|
||||
prompt = "[Automated message from OpenSwarm itself, not written by your user] " + prompt
|
||||
skill_meta = [{"id": s["id"], "name": s["name"]} for s in (attached_skills or [])] or None
|
||||
image_meta = [{"data": img["data"], "media_type": img.get("media_type", "image/png")} for img in (images or [])] or None
|
||||
user_msg = Message(
|
||||
|
||||
Reference in New Issue
Block a user