Repository navigation
workbuddy 0.2.2: a refused opening keeps its name, and a refusal names where its fix is written - #511
Conversation
A DeepSeek Harness chat's system prompt opens with "You are an AI agent powered by DeepSeek Harness.", which WorkBuddy refuses as 11128 "Illegal API invocation from an unapproved channel" (plugins#279). The plugin puts it in other words before sending, but the words it chose — "You are an AI agent that helps the user with programming tasks." — took the harness's name out of the only line that says which agent runs here, while the rest of a DSH prompt goes on naming DeepSeek Harness (the checkout path, the runtime context). Read back, the agent is told two different things about itself in one prompt, and the one it reads first is the false one. WorkBuddy's channel check matches a refused line whole and exactly — the plugin's own note has it that one extra space lets the line through — so the comma is enough, and the name stays. Measured 2026-10-30 against https://copilot.tencent.com/v2/chat/completions, one account, streamed as WorkBuddy requires, deepseek-v4.1-flash, reasoning_effort max, 64 output tokens: system You are an AI agent powered by DeepSeek Harness. -> 400 {"code":11128,"msg":"Illegal API invocation from an unapproved channel"} system You are an AI agent, powered by DeepSeek Harness. -> 200, reasoning_content 59 chars, answer as asked A whole DSH-style prompt (opener, checkout path, the Web GUI sentence, persona rules) with the comma went out as one chat and came back naming DeepSeek Harness, so the opener is the only line that has to move. unflag.test.mjs holds the new wording, and that the reworded line still names the harness and stays as it is when it passes again.
|
Thanks @MYCF711! Merged at 4830b16. 257/257 tests pass on main, and the unflag tests go red with the old wording. A real deepseek-v4.1-flash request through workbuddy-ai came back 200. workbuddy 0.2.2 is on npm, and magpie v0.1.2161 raises the WorkBuddy mover's min to it. Not tried on the China site (our account there answers 401), so that case rests on your 400→200 measurement. |
|
Verified on my side.
China site: no account there either, so that half stays uncovered. I am not claiming it. One signal worth watching: On the min raise: I could not verify it here. |
What
Three changes to how a refused chat is handled, all driven by measurements against
copilot.tencent.com(2026-10-30, real accounts, streamed,deepseek-v4.1-flash,reasoning_effort: max).1. DeepSeek Harness's opener keeps the harness's name
DSH's system prompt opens with
which WorkBuddy refuses as
11128 Illegal API invocation from an unapproved channel(plugins#279). The plugin already rewords it, but it reworded it intowhich takes the harness's name out of the only line that says which agent is running. WorkBuddy matches a refused line whole and exactly — the plugin's own note on
FLAGGEDsays one extra space lets it through — so a comma is enough:You are an AI agent powered by DeepSeek Harness.{"code":11128,…}You are an AI agent, powered by DeepSeek Harness.2. A refusal of words not reworded yet is answered with a comma before the system prompt moves
The next thing tried used to be the destructive one: move the whole system prompt into the first user message and put
You are a helpful assistant.in its place. That costs the agent the slot its instructions are read in. Now the same words are said with one more comma first (OPENERS), and only a chat still refused is moved.Measured that a word added after the product name is not what passes:
…powered by DeepSeek Harness Desktop.…powered by DeepSeek Harness CLI.…powered by Claude Code.…powered by FooBar.So the trigger is a shape plus a name; break either and it passes. Adding
Desktopbuys nothing, which is why the fix changes the shape, not the wording.3. A refusal carries the address of its own fix
REFUSED.md(new) says what the check reads, the shapes measured to pass and to fail, the two errors that look like this one and are not (11101non-stream;11128"first message is not system prompt"), and how to turn such a line off in the agent that emits it. The refusal's message now names that file — before the hint, never after it, because magpie's Routing page matches the hint by the message ending in it:So a user can paste the error at their own agent and the agent can go read the fix.
Tests
New:
comma.test.mjs(the comma goes in, the harness's name survives, a chat with nothing of the kind is not resent,commaPausedreaches a message's parts), plus a test insystemasuser.test.mjsthat an openingFLAGGEDdoesn't know is said with a comma and the system message keeps its slot — the behaviour this changes — and assertions that a refusal still ends in the hint with the doc address before it.Note for reviewers
The
REFUSED.mdURL points atmain; it resolves once this is merged. Until then the link 404s for anyone reading a refusal from the branch build.