From e1b2fa9a144bd40651cc8361a82ee0e01ce9402a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 27 Apr 2026 21:15:41 +0900 Subject: [PATCH] test(call-omo-agent): add sync-executor test coverage Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- .../call-omo-agent/sync-executor.test.ts | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/tools/call-omo-agent/sync-executor.test.ts b/src/tools/call-omo-agent/sync-executor.test.ts index 18f1147f2..aab485706 100644 --- a/src/tools/call-omo-agent/sync-executor.test.ts +++ b/src/tools/call-omo-agent/sync-executor.test.ts @@ -395,6 +395,26 @@ describe("executeSync", () => { expect(spawnReservation.commit).toHaveBeenCalledTimes(1) expect(spawnReservation.rollback).toHaveBeenCalledTimes(0) }) + + test("strips legacy ZWSP-prefixed agent names from persisted sync prompt body (GH-3259)", async () => { + //#given - persisted sync invocation from v3.14.0-v3.16.0 with ZWSP prefix on subagent_type + const executeSync = await importExecuteSync() + const deps = createDependencies() + const toolContext = createToolContext() + const recorder = createPromptAsyncRecorder() + const args = { + subagent_type: "\u200B\u200BHephaestus - Deep Agent", + description: "legacy zwsp", + prompt: "find something", + run_in_background: false, + } + + //#when + await executeSync(args, toolContext, createContext(recorder.promptAsync) as never, deps) + + //#then + expect(recorder.getCapturedInput()?.body.agent).toBe("Hephaestus - Deep Agent") + }) }) export {}