| 276 | } |
| 277 | |
| 278 | public async launch(): Promise<RemoteLauncherExitReason> { |
| 279 | if (this.session.codexArgs && this.session.codexArgs.length > 0) { |
| 280 | if (hasCodexCliOverrides(this.session.codexCliOverrides)) { |
| 281 | logger.debug(`[codex-remote] CLI args include sandbox/approval overrides; other args ` + |
| 282 | `are ignored in remote mode.`); |
| 283 | } else { |
| 284 | logger.debug(`[codex-remote] Warning: CLI args [${this.session.codexArgs.join(', ')}] are ignored in remote mode. ` + |
| 285 | `Remote mode uses message-based configuration (model/sandbox set via web interface).`); |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | return this.start({ |
| 290 | onExit: () => this.handleExitFromUi(), |
| 291 | onSwitchToLocal: () => this.handleSwitchFromUi() |
| 292 | }); |
| 293 | } |
| 294 | |
| 295 | protected async runMainLoop(): Promise<void> { |
| 296 | const session = this.session; |