From 317e2c6465effc8bd8309b9d8354d85671efb960 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Wed, 8 Apr 2026 13:01:51 +0900 Subject: [PATCH] fix(zwsp): strip zero-width chars in start-work-hook Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/hooks/start-work/start-work-hook.ts | 3 ++- src/shared/agent-display-names.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hooks/start-work/start-work-hook.ts b/src/hooks/start-work/start-work-hook.ts index f916c2eae..7a85491df 100644 --- a/src/hooks/start-work/start-work-hook.ts +++ b/src/hooks/start-work/start-work-hook.ts @@ -14,6 +14,7 @@ import { log } from "../../shared/logger" import { getAgentDisplayName, getAgentListDisplayName, + stripAgentListSortPrefix, } from "../../shared/agent-display-names" import { isAgentRegistered, @@ -90,7 +91,7 @@ export function createStartWorkHook(ctx: PluginInput) { : getAgentDisplayName(activeAgent) updateSessionAgent(input.sessionID, activeAgent) if (output.message) { - output.message["agent"] = activeAgentDisplayName + output.message["agent"] = stripAgentListSortPrefix(activeAgentDisplayName) } const existingState = readBoulderState(ctx.directory) diff --git a/src/shared/agent-display-names.ts b/src/shared/agent-display-names.ts index d74287c28..9841074e4 100644 --- a/src/shared/agent-display-names.ts +++ b/src/shared/agent-display-names.ts @@ -33,7 +33,7 @@ const AGENT_LIST_SORT_PREFIXES: Record = { atlas: "\u200B\u200B\u200B\u200B", } -function stripAgentListSortPrefix(agentName: string): string { +export function stripAgentListSortPrefix(agentName: string): string { return agentName.replace(/^\u200B+/, "") }