A chat WorkBuddy refuses as an unapproved channel (11128) for an opening FLAGGED
doesn't know is sent once more with one more comma in the opening ("You are an
AI agent, powered by X.") before the system prompt is moved into the first user
message. The comma is set in system and assistant messages only; user messages
and tool results go out as written. A system prompt whose comma passed is
remembered (bounded at 256, like refusedSystems) and its next chats go with the
comma before the first send, so a tool loop is not refused on every step. A
refusal that stands names REFUSED.md (new) before the hint; that address is
only in the error returned to the client, nothing sent upstream names magpie.
Version 0.2.3.
Run at the reviewed head cb8a026 on mote (macOS), temp HOME, outbound network
denied by sandbox-exec (localhost allowed):
- packages/workbuddy `bun test`: 271 pass, 0 fail.
- repo root `bun test`: 3774 pass, 1 fail (layerfs import-limit, fixed on main
by 3dd0f44). cb8a026 merged with origin/main 4d8d031: 3777 pass, 0 fail.
- `bun scripts/check.mjs`: only cloudflare-workers-ai fails, with the network
refused (#519); workbuddy ✓.
Broken by hand: no commaSystems.add -> remembered-comma test red; no pre-send
commaPausedOn -> same test red; role filter removed -> 5 tests red.
Not covered: dropping the roles.has("system") guard leaves every test green
(an assistant-only comma would be remembered). Not tried against
copilot.tencent.com in this review.
Co-authored-by: MYCF711 <MYCF711@users.noreply.github.com>