Files
agent-skills/systemd/pr-daemon.service
T
Miguel Palhas 35b4823edc fix(pr-daemon): prompt new sessions immediately, pin TMUX_TMPDIR
A started session waited for the next tick to get its opening prompt, and
the pending flag lived in memory, so a restart in between left it sitting
empty with nothing to do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 19:06:32 +01:00

29 lines
1.1 KiB
Desktop File

[Unit]
Description=PR daemon — watches GitHub/Gitea PRs and routes them to aoe sessions
Documentation=https://git.naps.pt/yolo/agent-skills
After=network.target
ConditionPathExists=%h/.config/reviewer/config.json
ConditionPathExists=%h/.config/reviewer/env
# MUST stay 0: at RestartSec=5 a fast-crashing daemon burns the default
# 5-starts-per-10s budget and systemd parks the unit in `failed` until a
# manual `systemctl --user reset-failed`.
StartLimitIntervalSec=0
[Service]
Type=simple
WorkingDirectory=%h
Environment=PATH=%h/.local/bin:%h/.nix-profile/bin:/etc/profiles/per-user/naps62/bin:/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/bin
# Without this the daemon reaches a different tmux server than the shell and
# TUI do, so sessions it starts are invisible where you look for them.
Environment=TMUX_TMPDIR=%t
EnvironmentFile=%h/.config/reviewer/env
ExecStart=bun %h/tea/yolo/agent-skills/bin/reviewer-poll.ts
Restart=always
RestartSec=5
# The agent tmux sessions this daemon starts land in its cgroup, so the default
# control-group kill takes every running agent down with a daemon restart.
KillMode=process
[Install]
WantedBy=default.target