fix: pass SESSION_NAME to all agent-session.sh function calls

Library functions need explicit session name argument — they no longer
have closure over $SESSION_NAME from the parent script.

- agent_kill_session: add $SESSION_NAME to all 11 call sites
- agent_inject_into_session: add $SESSION_NAME to all call sites in
  phase-handler.sh and gardener-agent.sh
- agent_kill_session: guard against missing arg (defensive)
This commit is contained in:
openhands 2026-03-18 16:24:58 +00:00
parent 350acccd8b
commit d83098f382
4 changed files with 26 additions and 25 deletions

View file

@ -60,5 +60,6 @@ inject_formula() {
# Kill a tmux session gracefully (no-op if not found).
agent_kill_session() {
tmux kill-session -t "$1" 2>/dev/null || true
local session="${1:-}"
[ -n "$session" ] && tmux kill-session -t "$session" 2>/dev/null || true
}