Skip to content

fix(codex-session): correct tty lookup per pid#3

Merged
CondorCommodore merged 1 commit into
mainfrom
fix/codex-session-tty-per-pid
May 29, 2026
Merged

fix(codex-session): correct tty lookup per pid#3
CondorCommodore merged 1 commit into
mainfrom
fix/codex-session-tty-per-pid

Conversation

@CondorCommodore
Copy link
Copy Markdown
Owner

Summary

  • Resolve each live codex process tty with ps -p <pid> -o tty= instead of trusting the bulk process scan.
  • Keep parser-only tests compatible with older inline-tty ps fixtures.
  • Add regression coverage for two live codex PIDs on distinct ttys and no-tty skip behavior.

Test plan

  • python3 -m pytest tests/test_classify_codex.py tests/test_codex_session_tty.py -q
  • CLAUDE_ITERM2_TAB_STATUS_DIR=/tmp/codex-smoke python3 scripts/codex_session.py
  • Compared emitted signal ttys with ps -p <pid> -o tty=: 20189=/dev/ttys003, 20254=/dev/ttys004

Note: python3 -m pytest -q is blocked in this local environment because pytest-asyncio/asyncio marker support is not installed; the codex-session focused tests pass.

cr-task:311605c8

Resolve each live codex process tty with ps -p <pid> -o tty= instead of trusting the bulk process scan tty field.

Verification: python3 -m pytest tests/test_classify_codex.py tests/test_codex_session_tty.py -q; CLAUDE_ITERM2_TAB_STATUS_DIR=/tmp/codex-smoke python3 scripts/codex_session.py
@CondorCommodore CondorCommodore merged commit c3f6e88 into main May 29, 2026
4 of 5 checks passed
@CondorCommodore CondorCommodore deleted the fix/codex-session-tty-per-pid branch May 29, 2026 13:55
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.

1 participant