fix(afk): detect GUI-hosted primary and refuse instead of guessing a pane#661
Open
tkyk1024 wants to merge 1 commit into
Open
fix(afk): detect GUI-hosted primary and refuse instead of guessing a pane#661tkyk1024 wants to merge 1 commit into
tkyk1024 wants to merge 1 commit into
Conversation
…pane The away-mode daemon injects escalations via tmux/herdr pane targeting. A Claude Desktop local-agent-mode primary has no such pane: prior code fell back to a guessed target (firstmate:0) that could coincidentally resolve to an unrelated stale session, silently misdirecting escalations instead of failing loudly. Add fm_supervisor_gui_hosted (no tmux/herdr markers + Claude Desktop's __CFBundleIdentifier, verified empirically) and wire a refusal into both fm-afk-launch.sh entry points and the daemon's own auto-discovery. Document the limitation in the afk skill and AGENTS.md.
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
firstmate:0) could coincidentally resolve against an unrelated stale session and silently misdirect escalations instead of failing loudly.fm_supervisor_gui_hosted(bin/fm-supervisor-target-lib.sh): detects no tmux/herdr pane markers plus Claude Desktop's__CFBundleIdentifier, verified empirically against a live Claude Desktop-launched process.bin/fm-afk-launch.shentry points (start,start-native) andbin/fm-supervise-daemon.sh's own auto-discovery, so the daemon never silently guesses a pane on a GUI-hosted primary. An explicitFM_SUPERVISOR_TARGET/FM_SUPERVISOR_BACKENDstill overrides detection.afkskill andAGENTS.md.Test plan
bin/fm-lint.sh(shellcheck) - cleantests/fm-daemon.test.sh- all pass, including newfm_supervisor_gui_hostedand daemon-startup-refusal casestests/fm-afk-launch.test.sh- all pass, including newstart/start-nativerefusal cases/no-mistakes.