Problem
In containerized environments (Docker, Paperclip integrations, cron), Hermes Agent is invoked via hermes chat -q with piped stdin/stdout. The cli_main() function unconditionally sets HERMES_INTERACTIVE=1, triggering sudo password prompts and approval prompts even when no user is present. Each prompt waits 45s before timing out.
Expected Behavior
HERMES_INTERACTIVE should only be set when both stdin and stdout are real TTYs. Piped callers should never see interactive prompts.
Steps to Reproduce
echo 'hello' | hermes chat -q — eventually times out after 45s
- Run via Paperclip adapter heartbeat — hangs on approval prompt
Proposed Fix
Gate HERMES_INTERACTIVE=1 behind sys.stdin.isatty() && sys.stdout.isatty(). Also handle PermissionError when ~/.hermes/.env is unreadable in non-root container setups.
PR: #16529
Problem
In containerized environments (Docker, Paperclip integrations, cron), Hermes Agent is invoked via
hermes chat -qwith piped stdin/stdout. Thecli_main()function unconditionally setsHERMES_INTERACTIVE=1, triggering sudo password prompts and approval prompts even when no user is present. Each prompt waits 45s before timing out.Expected Behavior
HERMES_INTERACTIVEshould only be set when both stdin and stdout are real TTYs. Piped callers should never see interactive prompts.Steps to Reproduce
echo 'hello' | hermes chat -q— eventually times out after 45sProposed Fix
Gate
HERMES_INTERACTIVE=1behindsys.stdin.isatty() && sys.stdout.isatty(). Also handlePermissionErrorwhen~/.hermes/.envis unreadable in non-root container setups.PR: #16529