diff --git a/cli/src/codex/codexMcpClient.ts b/cli/src/codex/codexMcpClient.ts index 23e719ea..8352704a 100644 --- a/cli/src/codex/codexMcpClient.ts +++ b/cli/src/codex/codexMcpClient.ts @@ -262,8 +262,9 @@ export class CodexMcpClient { toolCallId, toolName, { - command: command ?? [], - cwd: cwd ?? '' + message: typeof params.message === 'string' ? params.message : undefined, + command: command ?? undefined, + cwd: cwd ?? undefined } ); diff --git a/cli/src/codex/codexRemoteLauncher.ts b/cli/src/codex/codexRemoteLauncher.ts index 8e8b68a8..7c37c786 100644 --- a/cli/src/codex/codexRemoteLauncher.ts +++ b/cli/src/codex/codexRemoteLauncher.ts @@ -314,6 +314,7 @@ class CodexRemoteLauncher extends RemoteLauncherBase { const permissionHandler = new CodexPermissionHandler(session.client, { onRequest: ({ id, toolName, input }) => { const inputRecord = input && typeof input === 'object' ? input as Record : {}; + const message = typeof inputRecord.message === 'string' ? inputRecord.message : undefined; const rawCommand = inputRecord.command; const command = Array.isArray(rawCommand) ? rawCommand.filter((part): part is string => typeof part === 'string').join(' ') @@ -329,6 +330,7 @@ class CodexRemoteLauncher extends RemoteLauncherBase { callId: id, input: { tool: toolName, + message, command, cwd }, diff --git a/web/src/components/ToolCard/knownTools.tsx b/web/src/components/ToolCard/knownTools.tsx index 3117ad39..8d07e5d7 100644 --- a/web/src/components/ToolCard/knownTools.tsx +++ b/web/src/components/ToolCard/knownTools.tsx @@ -143,7 +143,7 @@ export const knownTools: Record getInputStringAny(opts.input, ['command']) ?? null, + subtitle: (opts) => getInputStringAny(opts.input, ['message', 'command']) ?? null, minimal: true }, shell_command: {