Skip to content

fix(agent): communication hygiene — no internal-detail leaks, no step narration#56

Merged
anfibiacreativa merged 2 commits into
mainfrom
fix/agent-error-disclosure
Jul 8, 2026
Merged

fix(agent): communication hygiene — no internal-detail leaks, no step narration#56
anfibiacreativa merged 2 commits into
mainfrom
fix/agent-error-disclosure

Conversation

@anfibiacreativa

Copy link
Copy Markdown
Member

Summary

Hardens how the agent talks to authors. Two related guardrails added to the base
system prompt (src/prompt-builder.ts, in buildSystemPrompt, so it applies to every
response regardless of skill or agent preset):

  1. No internal/infrastructure detail disclosure — never surface HTTP status codes
    (500/503), internal service/backend names, stack traces, raw error objects, retry
    counts, or tool-call mechanics. Transient failures are retried silently; an ultimate
    failure gets a brief, non-technical apology, never the underlying cause.
  2. No step narration — the agent does not narrate its plan or intermediate progress
    ("I'll convert this first, then create the page", "Now I have the content", "Let me
    try again"); it performs the work and reports the result.

Problem

In a live chat, creating a page from an attached document, the agent exposed internal
detail and narrated its mechanics to the author, e.g.:

"I'll convert the Word document to markdown first, then create the page from it."
"Now I have the content. Let me create the /firefly-seo page…"
"The service returned a 503 temporarily. Let me retry:"

Authors should never see 503/service internals (a UX problem and a security-hygiene
problem — don't disclose internal error info), nor a play-by-play of tool steps.

What changed

  • src/prompt-builder.ts — new "## Communicating with the user" section in the base
    system prompt covering both guardrails above.
  • test/prompt-builder.test.ts — asserts the guidance is present (no-internal-details
    phrasing + the no-narration phrasing).

Commits:

  • 9a3f788 — do not disclose internal error details (status codes, services, retries)
  • 80ea711 — also stop narrating internal plan/progress steps

Test plan

  • npm test → all pass (307).
  • Manual: trigger a transient backend failure mid-task → the agent retries without
    mentioning it; on a multi-tool task it reports the outcome without narrating each step.

Risk

Low. Prompt-only change to user-facing communication; no behavioral/tool changes. Worst
case the model is slightly terser about progress.

anfibiacreativa and others added 2 commits June 29, 2026 14:46
…vices, retries) to users

Surfacing HTTP status codes, backend service names, retry counts, or
tool-call mechanics to authors is both a UX problem (confusing noise)
and a security-hygiene concern (internal infrastructure disclosure).

- Add a "Communicating with the user" section to the base system
  prompt instructing the agent to handle transient failures silently,
  never narrate retries or tool mechanics, and give only a brief
  non-technical apology when an operation ultimately fails.
- Add a prompt-builder test asserting the guidance is present
  (anchored on "Never expose internal", "HTTP status codes",
  "stack traces", and "retry as needed without narrating it").

Co-Authored-By: Claude <[email protected]>
Widens the user-communication guidance: the agent should not narrate its plan
or intermediate progress ("I'll convert this first, then create the page",
"Now I have the content", "Let me try again") — just perform the work and
report the result.

Co-Authored-By: Claude <[email protected]>
@anfibiacreativa
anfibiacreativa merged commit dbffd4d into main Jul 8, 2026
4 checks passed
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.24.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants