Skip to content

fix: platform-aware script command for Linux compatibility#6

Open
Sinha-Aditya wants to merge 1 commit intokingbootoshi:mainfrom
Sinha-Aditya:fix/linux-script-command
Open

fix: platform-aware script command for Linux compatibility#6
Sinha-Aditya wants to merge 1 commit intokingbootoshi:mainfrom
Sinha-Aditya:fix/linux-script-command

Conversation

@Sinha-Aditya
Copy link

@Sinha-Aditya Sinha-Aditya commented Feb 14, 2026

Summary

  • Fixes src/tmux.ts:79 to use platform-aware script command syntax
  • macOS (script -q <file> <command>) vs Linux (script -q -c "<command>" <file>)
  • Without this fix, codex-agent sessions fail silently on Linux

Closes #5

Changes

  • Added process.platform === "linux" detection in createSession()
  • Selects correct script argument order based on platform
  • No behavioral change on macOS — existing syntax preserved

Test plan

  • Tested on Linux (Ubuntu 6.6.10) — codex-agent sessions launch and capture output correctly
  • macOS path unchanged (original syntax preserved in else branch)

The `script` command has different syntax on macOS vs Linux:
- macOS: `script -q <file> <command>`
- Linux: `script -q -c "<command>" <file>`

Without this fix, `codex-agent` sessions fail silently on Linux
because `script` interprets the arguments incorrectly, causing
the tmux session to exit immediately without running codex.

Added `process.platform === "linux"` detection to use the correct
syntax on each platform.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: codex-agent fails on Linux — script command syntax is macOS-only

1 participant