#!/bin/bash
run_repo="$HOME/runs/run-20260824T145935Z-w62t57/repo"
run_state="$HOME/runs/run-20260824T145935Z-w62t57/state"
cd "$run_repo" || exit 97
exec > >(tee -a "$run_state/output.log") 2>&1
export PATH="$PATH:$HOME/.claude/bin:$HOME/.local/bin"
export HARNESS_CHILD_SLICE='agent-run.slice'
export RUN_REMOTE_PLACED='1'
set +e
(
bash -c /usr/bin/printf %s Y2QgcHJlc3Mtem9uZS1iYWNrZW5kL2FwaSAmJiAvdXNyL2Jpbi9ub2RlIC4vbm9kZV9tb2R1bGVzL3R5cGVzY3JpcHQvYmluL3RzYyAtLW5vRW1pdCAtLXByZXR0eSBmYWxzZQ== | base64 -d | bash
)
rc=$?
printf "%s" "$rc" > "$run_state/exit-code.tmp"
mv "$run_state/exit-code.tmp" "$run_state/exit-code"
printf "\n[run-remote] finished rc=%s\n" "$rc"
exit $rc
