diff --git a/packages/autoclaw/index.mjs b/packages/autoclaw/index.mjs index 5abfd1d..c8f1423 100644 --- a/packages/autoclaw/index.mjs +++ b/packages/autoclaw/index.mjs @@ -97,6 +97,12 @@ const FLAGGED = [ [/You are Cline/gi, "You are the Cline agent"], [/You are Qwen Code/gi, "You are the Qwen Code agent"], [/You are ZCode/gi, "You are the ZCode agent"], + // #1094: ZCode's built-in subagents (general-purpose) open "You are an + // agent for ZCode CLI." — 406 on autoclaw while the main session, same + // minute and account, is 200; the reporter's patched run was 200 x2. The + // "You are ZCode" rule above can't catch it. As for Claude Code's + // subagents, only an article goes in front of the name. + [/an agent for ZCode/gi, "an agent for the ZCode"], [/operating inside pi, a coding agent harness/gi, "operating inside the pi coding agent harness"], // ZCode's opening line is "This conversation is powered by GLM-"; // the CN gateway refuses that wording with any GLM version, in any case, diff --git a/packages/autoclaw/index.test.mjs b/packages/autoclaw/index.test.mjs index dcb7ce0..1a3ef32 100644 --- a/packages/autoclaw/index.test.mjs +++ b/packages/autoclaw/index.test.mjs @@ -398,6 +398,10 @@ test("a system prompt carrying every known line at once comes out clean in one p ["You are Cline, a coding assistant.", "You are the Cline agent, a coding assistant."], ["You are Qwen Code, an interactive CLI tool.", "You are the Qwen Code agent, an interactive CLI tool."], ["You are ZCode, an interactive coding agent", "You are the ZCode agent, an interactive coding agent"], + // #1094: ZCode's subagent opening line + ["You are an agent for ZCode CLI. Given the user's message, you should use the tools available to complete the task.", "You are an agent for the ZCode CLI. Given the user's message, you should use the tools available to complete the task."], + // the rewritten form is left as it is + ["You are an agent for the ZCode CLI.", "You are an agent for the ZCode CLI."], ["operating inside pi, a coding agent harness.", "operating inside the pi coding agent harness."], ["This conversation is powered by GLM-5.3 · AutoClaw 国内 (Zhipu)", "This conversation is powered by the GLM-5.3 model · AutoClaw 国内 (Zhipu)"], ["You are powered by the model glm-5.3-flash[1m].", "You are powered by the GLM-5.3-flash model."], diff --git a/packages/autoclaw/package.json b/packages/autoclaw/package.json index 07ab224..0daeafc 100644 --- a/packages/autoclaw/package.json +++ b/packages/autoclaw/package.json @@ -1,6 +1,6 @@ { "name": "@magpie-community/opencode-autoclaw-auth", - "version": "0.2.22", + "version": "0.2.23", "description": "OpenCode provider plugin for AutoClaw (Zhipu OpenClaw): oversea web sign-in (Google/z.ai) and CN phone SMS, multi-account pool, credit balance and daily check-in", "type": "module", "main": "./opencode.mjs",