Repository navigation
Add Codex detached start adapter - #520
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Codex-specific detached-start path for AIRC so Codex shell tool exits do not reap the background airc join owner. This fits the Codex integration layer by replacing ad-hoc nohup snippets with a dedicated adapter command.
Changes:
- Add
airc codex-startand the backing Python launcher moduleairc_core.codex_start. - Update Codex-facing skills and README guidance to use
airc codex-startinstead of rawnohup airc join &. - Add a unit test covering the Python detached-launch helper.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_codex_start.py |
Adds a unit test for the new detached-start helper's subprocess invocation. |
skills/update/SKILL.md |
Replaces manual Codex restart snippet with airc codex-start. |
skills/resume/SKILL.md |
Switches Codex resume instructions to airc codex-start. |
skills/repair/SKILL.md |
Switches Codex repair instructions to airc codex-start "$INVITE". |
skills/join/SKILL.md |
Updates Codex join guidance to use the new adapter command. |
skills/canary/SKILL.md |
Uses airc codex-start in the Codex canary bounce flow. |
README.md |
Documents the new Codex start adapter at a high level. |
lib/airc_core/codex_start.py |
Implements the detached subprocess launcher for airc join. |
lib/airc_bash/cmd_status.sh |
Adds the cmd_codex_start shell entrypoint and post-launch status/inbox output. |
airc |
Wires codex-start into top-level command dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+574
to
+582
| cmd_codex_start() { | ||
| ensure_init | ||
|
|
||
| local _log="$AIRC_WRITE_DIR/codex-airc.log" | ||
| "$AIRC_PYTHON" -m airc_core.codex_start \ | ||
| --airc "$0" \ | ||
| --home "$AIRC_WRITE_DIR" \ | ||
| --log "$_log" \ | ||
| -- "$@" |
Comment on lines
+578
to
+590
| "$AIRC_PYTHON" -m airc_core.codex_start \ | ||
| --airc "$0" \ | ||
| --home "$AIRC_WRITE_DIR" \ | ||
| --log "$_log" \ | ||
| -- "$@" | ||
|
|
||
| # Give the detached process a short startup window, then print the same | ||
| # useful local surfaces that `airc join` prints when it returns quickly. | ||
| sleep 2 | ||
| echo "" | ||
| echo "Status" | ||
| echo "------" | ||
| cmd_status |
Comment on lines
+574
to
+582
| cmd_codex_start() { | ||
| ensure_init | ||
|
|
||
| local _log="$AIRC_WRITE_DIR/codex-airc.log" | ||
| "$AIRC_PYTHON" -m airc_core.codex_start \ | ||
| --airc "$0" \ | ||
| --home "$AIRC_WRITE_DIR" \ | ||
| --log "$_log" \ | ||
| -- "$@" |
Comment on lines
+42
to
+43
| proc = subprocess.Popen( | ||
| [args.airc, "join", *join_args], |
This was referenced May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Codex shell tool calls can reap plain
nohup airc join &children when the tool call exits. That made the Codex/joinskill report a briefly healthy owner, then leave a stale pidfile and makeairc msgrefuse delivery.This adds
airc codex-start, backed byairc_core.codex_start, which launchesairc joinwithstart_new_session=Trueand forcedAIRC_HOME. The Codex-facing skills now call that adapter instead of raw nohup. This is not the login daemon/autostart path; it is a session-scope Codex runtime adapter.Validation
bash -n airc lib/airc_bash/cmd_status.sh lib/airc_bash/cmd_connect.sh lib/airc_bash/cmd_send.sh lib/airc_bash/cmd_teardown.sh test/integration.shgit diff --checkpython3 test/test_codex_start.pypython3 test/test_codex_hook.py./airc doctor --tests python_units-> 14 passed, 0 failedairc codex-startsurvived after the tool call exited, status reachedtransport health: ok (2 channel(s) fresh), andairc msg --channel general ...delivered.