improve: reduce progress email frequency and clarify recipient address

linuztx committed Mar 17, 2026 at 23:19 UTC e8aaba1223204926ccd9feabbd1fbc1972513f90
4 files changed +15 -17
plugins/_email_integration/helpers/handler.py
+2
@@ -366,9 +366,11 @@ def _is_own_email(sender: str, own_address: str) -> bool:
366 # ------------------------------------------------------------------
367
368 def _build_user_message(agent: Agent, msg: InboundMessage, handler_cfg: dict) -> str:
369 + recipient = handler_cfg.get("username", "")
370 text = agent.read_prompt(
371 "fw.email.user_message.md",
372 sender=msg.sender,
373 + recipient=recipient,
374 subject=msg.subject,
375 body=msg.body,
376 )
plugins/_email_integration/prompts/fw.email.system_context.md
+4 -5
@@ -1,9 +1,8 @@
1 email session user communicates via email
2 -user sees NOTHING unless you call response tool
2 +response tool = send email to user (do NOT use python to email)
3
4 -BEFORE EVERY action call response with break_loop false
5 -describe what you will do next then execute
6 -repeat for every action never skip
4 +act human do NOT email before every action
5 +only email for complex task confirmations or final answer
6
8 -break_loop false > sends progress email continues working
7 +break_loop false > sends email continues working
8 break_loop true or omit > final answer ends session
plugins/_email_integration/prompts/fw.email.system_context_reply.md
+8 -11
@@ -1,24 +1,21 @@
1 ## email session active
2 -user sees NOTHING unless you call response tool
3 -your reasoning and tool calls are invisible to user
4 -only response tool output reaches user as email
2 +user communicates via email
3 +response tool = send email to user
4 +do NOT use python code to send emails
5
6 -### mandatory workflow for every action
7 -BEFORE executing any tool or action
8 -call response with break_loop false
9 -tell user what you will do next
10 -then execute
11 -NEVER skip user is blind without it
6 +### communication flow
7 +act human do NOT email before every action
8 +only email for complex task confirmations or final answer
9
10 ### break_loop usage
14 -break_loop false > progress update keeps working
11 +break_loop false > sends email keeps working
12 omit or true > final answer ends session
13 ~~~json
14 {
15 ...
16 "tool_name": "response",
17 "tool_args": {
21 - "text": "I will now...",
18 + "text": "Task will take a while, starting now...",
19 "break_loop": false
20 }
21 }
plugins/_email_integration/prompts/fw.email.user_message.md
+1 -1
@@ -1,4 +1,4 @@
1 -[Email from {{sender}}]
1 +[Email from {{sender}} to {{recipient}}]
2 Subject: {{subject}}
3
4 {{body}}