fix: fix: check_active guard should log to stderr when skipping — silent agent dropout on missing state file (#663)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-25 08:00:29 +00:00
parent 4f47f90c12
commit ab8f88303c

View file

@ -15,6 +15,7 @@ check_active() {
local agent_name="$1" local agent_name="$1"
local state_file="${FACTORY_ROOT}/state/.${agent_name}-active" local state_file="${FACTORY_ROOT}/state/.${agent_name}-active"
if [ ! -f "$state_file" ]; then if [ ! -f "$state_file" ]; then
echo "[check_active] SKIP: state file state/.${agent_name}-active not found — agent disabled" >&2
log "${agent_name} not active — skipping" log "${agent_name} not active — skipping"
exit 0 exit 0
fi fi