mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 10:48:20 +01:00
Root disconnect: when a choice was injected via bash (web beacon or PyQt popup), the /tmp state files were never updated — agent-ready-<TAB> stayed written (UI showed "waiting for input"), agent-current-prompt-<TAB> was never written (no "running" banner), and the Control panel stayed stale until the NEXT stop hook fired. Fixes: - agent-hook-lib.sh: add write_inject_state(tab, key, label) that clears the ready/closed sentinels and writes the current-prompt sentinel immediately after injection — same state update that /api/inject does for Control panel inject button flows - agent-hook-bridge.sh: extract inject_key and inject_label from the resolved choice, then call write_inject_state after emit_or_inject_prompt - agent-hook-lib.sh: add -- before prompt in write-chars call to prevent prompts starting with - from being parsed as flags Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>