#!/bin/bash
set -e

# Start tmux server in background
tmux new-session -d -s claude -c /root "bash"

# Give tmux a moment to stabilize
sleep 1

# Start gotty serving the tmux session
# -w: allow write (make terminal interactive)
# -p 8080: listen on port 8080
exec gotty -p 8080 -w tmux attach-session -t claude
