Repository navigation
Description
Before submitting
- I searched existing issues, discussions, and PRs and did not find a duplicate.
- I included enough detail to investigate the problem.
Area
apps/server
Steps to reproduce
Observed setup on Linux:
- Run
t3 serve --mode webas a lingering systemd user service without an interactive login session. - Leave Keep awake while agents work enabled and start an agent turn.
- Check the server process's permission with
pkcheck --action-id org.freedesktop.login1.inhibit-block-sleep --process <server-pid>. In the observed setup, it returns status 2 andauth_admin_keep, requiring authentication.
This report uses the code-path analysis below; a fresh upstream build was not run.
Expected behavior
An unsuccessful inhibitor acquisition should produce an actionable diagnostic, including the helper's exit status and denial reason, without claiming that a sleep inhibitor is already held.
Actual behavior
The server logs keep-awake holding sleep inhibitor when the helper process starts, before acquisition is known to have succeeded. The helper immediately exits, followed by keep-awake released sleep inhibitor and a generic KeepAwakeInhibitorExited stack trace. The observed warning includes neither the exit status nor the permission-denial reason.
The same condition is retried indefinitely while work remains active, with exponential backoff capped at 10 minutes. This is repeated low-rate noise, not a high-frequency retry storm.
Impact
Minor bug or occasional failure. Keep-awake is ineffective in this setup, and its diagnostics make the reason difficult to identify. Agent work otherwise continues normally.
Version or commit
Observed in a 0.1.10-based Linux build. The same failure-handling path remains on upstream main at 856c84e4b14653facaa3ee320cd165e4e1b103c1, checked by source inspection.
Environment
NixOS, systemd 262, non-WSL Linux server, systemd user service with lingering enabled.
Code-path evidence
- Linux command selection requests an
idle:sleepblock inhibitor. - Helper handling discards stderr, logs a hold on successful spawn, then retries any exit through the generic error path.
- systemd's Inhibit API requires the corresponding polkit authorization. systemd-inhibit acquires the lock before executing its child command.
Workaround
Set keepAwakeWhileAgentsWork to false on servers that do not need sleep prevention. This stopped the attempts after the existing grace period.
Related issues and PRs
PR #34128 introduced this feature. Issue #38059 and PR #38072 address WSL sleep prevention; this report concerns non-WSL Linux authorization failures and their diagnostics.
Investigated with GPT-6.1 Sol via Codex in T3 Code.
Activity