When to use
Use when Hermes/botfiles pickup or launcher flows claim a Zellij session was started for a Codex task, but attaching shows only an idle shell, missing task metadata, or verification based only on zellij list-sessions.
Core lesson
A detached Zellij session existing is not sufficient evidence that Codex launched successfully. Verify a real visible pane and the Codex process/UI before treating the lane as active.
Steps
Inspect the ticket/session state
- Check whether the Linear ticket actually contains repo-local evidence.
- If not, use the default project root policy (currently
~/pro/personal_osfor Arya ambiguous tickets). - Inspect the live session:
zellij list-sessionszellij action query-tab-names --session <session>zellij action dump-screen --session <session> -p <pane_id> -f
Check whether the launcher is over-crediting success
- Look at the launcher script and verify whether it only:
- creates a session, or
- also creates a pane running Codex.
- If verification only checks
zellij list-sessions, that is insufficient.
- Look at the launcher script and verify whether it only:
Validate
--dry-runhonestly- Run:
start-zellij-session-for-task --project-root <root> --dry-run <ISSUE>
- Confirm whether dry-run only prints the launch plan/script.
- Do not attribute launch-time pane verification failures to
--dry-rununless the tool truly performs launch under dry-run.
- Run:
Fix detached launch behavior
- Creating a detached session plus setting
options --default-shell <bootstrap>may not produce a visible pane that can be inspected. - Preferred fix on this setup:
- create the detached session
- launch the bootstrap as a real pane command with:
ZELLIJ_SESSION_NAME=<session> zellij run -- <bootstrap_path>
- This creates an inspectable pane like
terminal_1that actually runs Codex.
- Creating a detached session plus setting
Strengthen verification
- After launch, inspect the real pane (
terminal_1or returned pane) withdump-screen. - Require evidence such as:
OpenAI Codex- seeded task prompt like
$start-new-task <ISSUE> - correct repo cwd visible in UI
- Optionally verify process tree for the Codex child.
- If no visible Codex evidence appears after retries, fail the launcher and do not claim activation.
- After launch, inspect the real pane (
Normalize ticket state instead of broadening supervision
- If a real verified live Codex session exists for a ticket still in
Todo, the cleaner approach is to move the ticket toIn Progress. - Prefer keeping supervision cron scoped to normal active states rather than special-casing
Todolive lanes.
- If a real verified live Codex session exists for a ticket still in
Verification checklist
zellij list-sessionsshows the sessionzellij action list-panes(or equivalent session inspection) shows a real running panedump-screenon the active pane shows Codex UI, not just a shell prompt- task metadata/tracker context resolves if expected
- only then post activation markers or move ticket state
Pitfalls
- Existing stale session names can block honest relaunch; kill the stale session before retrying.
dump-screenagainst the wrong pane can make a healthy launch look broken.- Cron summaries may conflate dry-run and real-run output; re-run commands directly when in doubt.
- Do not treat a shell prompt in
~/pro/botfilesas evidence of a task lane for another repo.