Conversation
show_exochat_url_if_needed only looks at adapter log lines written after the launch started, and then polls for 30 seconds. That is right when exo.sh starts the adapter runner, because the exochat worker prints its URL on startup. It is wrong when ensure_adapters finds the runner from an earlier launch still alive and returns without restarting it. No worker starts, so no new URL is printed, and every relaunch of the canonical template waits the full 30 seconds and then prints: No ExoChat URL found yet. Watch the adapter log with: tail -f ... The URL is in the log the whole time. The exochat worker persists its channel and secret in session.json, so the URL it printed on an earlier launch is still the current one. Record in ensure_adapters when it reused a live runner, and in that case read the last ExoChat URL already in the log instead of waiting for a new one. The awk block now keeps the last match rather than the first, so a fresh runner that appends a new URL after an older adapter's URL still shows the new one. Assisted-by: Claude Fable 5.1
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.
Problem
show_exochat_url_if_neededonly looks at adapter log lines written after the current launch started, then polls once a second for 30 seconds. That is right whenexo.shstarts the adapter runner, because the exochat worker prints its URL on startup.It is wrong when
ensure_adaptersfinds the runner from an earlier launch still alive and returns without restarting it. No worker starts, so no new URL is printed. Every relaunch of the canonical template waits the full 30 seconds and then prints:The URL was in that log the whole time. The exochat worker persists its channel and secret in
session.jsonunder the adapter state dir, so the URL it printed on an earlier launch is still the current one.Fix
Record in
ensure_adapterswhen it reused a live runner. In that case read the last ExoChat URL already in the log instead of waiting for a new one.The awk block now keeps the last match rather than the first, so a fresh runner that appends a new URL below an older adapter's URL still shows the new one.
Reproduction
Runs
show_exochat_url_if_neededas extracted fromexo.shagainst a log that already holds a URL, withstart_lineset to the current line count the wayrun_replpasses it. Case A is a relaunch with a reused runner. Case B is a fresh runner that appends a new URL after 2 seconds, below an older adapter's URL.Before this change:
After:
The full harness is 60 lines of bash and I can attach it if that is useful.
Notes
show_signal_qr_if_neededkeeps itsstart_linewindow. A Signal linking QR is single use, so reusing an old one from the log would be wrong.This touches
show_exochat_url_if_needed, which #182 also edits. The hunks are different, mine changesstart_lineand the awk block while #182 changes the printed copy, so either order should merge with at most a trivial conflict.Test plan
/bin/bash -n exo.sh