You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,19 @@ Key facts:
86
86
- The server loads `.env` from its cwd (env vars win over the file) and refuses to start without `AUTH_TOKEN`. Note `.env`'s `PORT` may differ from the live port — the launcher passes `PORT` explicitly.
87
87
- The startup log line includes the commit the binary was built from: `freshell-server listening on http://0.0.0.0:<port> (ws://...) [commit <sha>]`. Use it (or `~/.freshell/logs/rust-server-3002.log`) to check what the running server was built from when asking "are we running change X?".
88
88
- Health check: `curl http://127.0.0.1:<port>/api/health` (unauthenticated, rate-limit exempt).
89
+
-**Detached launch:**`scripts/launch-rust.sh` starts the server in its own
90
+
session (`setsid`, stdin from `/dev/null`). Closing the launching shell
91
+
does NOT stop the server or its child agent terminals (this fixed the
92
+
SIGTERM/SIGHUP cascades visible as `shutdown_forensics` events). Stop it
93
+
only via `scripts/launch-rust.sh --stop [--port N]`. CAVEAT: WSL2 shuts
94
+
the whole VM down shortly after the LAST console/interop handle closes —
95
+
no launcher-side detachment survives that.
96
+
-**systemd user unit (recommended for unattended operation):** install
97
+
`installers/systemd/freshell-rust.service` (see its header for the
98
+
`/etc/wsl.conf` requirement and `loginctl enable-linger`). It cannot keep
99
+
the WSL VM alive either, but it restores the server at the next distro
100
+
boot and supervises restarts. systemd is NOT required — the setsid
101
+
launcher remains the default, dependency-free path.
89
102
90
103
## Codex Agent in CMD Instructions (Codex agents only; only when running in CMD on windows; all other agents must ignore)
91
104
- Prefer bash/WSL over PowerShell; Windows paths map like `D:\\...` -> `/mnt/d/...`.
0 commit comments