(args: string[])
| 16 | * Codex CLI format is `codex resume <session-id>`, so subcommand is always first. |
| 17 | */ |
| 18 | export function filterResumeSubcommand(args: string[]): string[] { |
| 19 | if (args.length === 0 || args[0] !== 'resume') { |
| 20 | return args; |
| 21 | } |
| 22 | |
| 23 | // First arg is 'resume', filter it and optional session ID |
| 24 | if (args.length > 1 && !args[1].startsWith('-')) { |
| 25 | logger.debug(`[CodexLocal] Filtered 'resume ${args[1]}' - session managed by hapi`); |
| 26 | return args.slice(2); |
| 27 | } |
| 28 | |
| 29 | logger.debug(`[CodexLocal] Filtered 'resume' - session managed by hapi`); |
| 30 | return args.slice(1); |
| 31 | } |
| 32 | |
| 33 | export async function codexLocal(opts: { |
| 34 | abort: AbortSignal; |
no test coverage detected