diff --git a/src/CodexCommands.ts b/src/CodexCommands.ts index 57df6e94..19df71e6 100644 --- a/src/CodexCommands.ts +++ b/src/CodexCommands.ts @@ -254,8 +254,8 @@ export class CodexCommands { return { handled: true }; } default: - await this.sendUnknownCommandMessage(commandName, sessionId); - return { handled: true }; + // Let Codex resolve unrecognized commands as raw prompts. + return { handled: false }; } } @@ -357,19 +357,6 @@ export class CodexCommands { await session.update(createAgentTextMessageChunk(`Command "/${name}" requires ${inputHint}.`)); } - private async sendUnknownCommandMessage(name: string, sessionId: string): Promise { - const lines = this.getBuiltinCommands().map(command => `- /${command.name}: ${command.description}`); - const text = [ - `Unknown command "/${name}".`, - "Available commands:" - ]; - if (lines.length > 0) { - text.push(...lines); - } - const session = new ACPSessionConnection(this.connection, sessionId); - await session.update(createAgentTextMessageChunk(text.join("\n"))); - } - private buildStatusMessage(sessionState: SessionState): string { const agentMode = sessionState.agentMode; const accountText = this.formatAccountInfo(sessionState.account);