Summary
Hermes Gate currently wraps remote commands through bash -l -c ... and also launches remote Hermes sessions with bash -l -c hermes.
This is a portability bug because it assumes the remote system has a compatible bash available in the expected way.
Current behavior
Remote command helpers are currently defined around:
return f"bash -l -c {shlex.quote(command)}"
and session creation uses:
tmux new-session -d -s <name> "bash -l -c hermes"
Why this matters
Not all target machines that can run Hermes Gate workflows will satisfy this assumption.
Common failure environments include:
- Alpine / BusyBox-style systems
- minimal containers
- hardened or enterprise hosts where login shells differ
- systems where
bash is absent or not on the expected path
The tool should not unnecessarily fail on systems that otherwise support SSH, tmux, and the target runtime.
Evidence
Observed in:
hermes_gate/session.py:109-120
hermes_gate/session.py:187-189
hermes_gate/app.py:644-669 for attach-time tmux command wrapping
Expected behavior
Remote execution should either:
- use a more portable shell invocation strategy
- detect capabilities explicitly
- or clearly document and enforce a justified platform requirement if bash is truly mandatory
For a general-purpose remote management tool, the preferred direction is broader compatibility rather than hidden shell assumptions.
Suggested direction
Candidate approaches:
- use
sh -lc if the command model permits it
- detect remote shell availability before relying on bash-specific behavior
- minimize shell nesting and pass argv in a way that reduces shell-specific coupling
- document any remaining hard requirement precisely if one cannot be avoided
Acceptance criteria
Testing requirements
Automated tests
- unit tests for remote command generation
- regression tests for any shell/capability detection logic introduced
Manual / integration validation
Validate against at least:
- a normal bash-based target
- a target where
/bin/sh exists but bash does not
- a target with tmux installed but different login-shell behavior
For each case, verify list/create/kill/attach behavior or verify that failures are explicit and documented.
Non-goals
- keeping the bash requirement implicit and only reacting after user bug reports
- solving only one code path while other remote helpers still hard-code
bash -l -c
Summary
Hermes Gate currently wraps remote commands through
bash -l -c ...and also launches remote Hermes sessions withbash -l -c hermes.This is a portability bug because it assumes the remote system has a compatible
bashavailable in the expected way.Current behavior
Remote command helpers are currently defined around:
and session creation uses:
Why this matters
Not all target machines that can run Hermes Gate workflows will satisfy this assumption.
Common failure environments include:
bashis absent or not on the expected pathThe tool should not unnecessarily fail on systems that otherwise support SSH, tmux, and the target runtime.
Evidence
Observed in:
hermes_gate/session.py:109-120hermes_gate/session.py:187-189hermes_gate/app.py:644-669for attach-time tmux command wrappingExpected behavior
Remote execution should either:
For a general-purpose remote management tool, the preferred direction is broader compatibility rather than hidden shell assumptions.
Suggested direction
Candidate approaches:
sh -lcif the command model permits itAcceptance criteria
bashis available on every target host unless that requirement is made explicit and intentionalTesting requirements
Automated tests
Manual / integration validation
Validate against at least:
/bin/shexists butbashdoes notFor each case, verify list/create/kill/attach behavior or verify that failures are explicit and documented.
Non-goals
bash -l -c