hermes - 💡(How to fix) Fix Terminal backend (local) reports inconsistent `crontab -l` output compared to user shell (same UID)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

With terminal.backend: local on macOS, Hermes appears to execute shell commands as the same user as the invoking shell, but crontab -l returns a different result when run through Hermes vs. when run directly in the user's terminal. This suggests either the command is not actually being executed, or its stdout is not faithfully captured/propagated by the terminal tool.

Root Cause

  • Attempting to install a shell wrapper around /usr/bin/crontab to verify whether Hermes actually invokes the binary is not possible on recent macOS because /usr/bin is on the Signed System Volume and mv/tee fail with Operation not permitted even under sudo.
  • Interactive TUI commands (e.g. crontab -e, vim) are also refused by the agent, which may be by design, but the inconsistency on the non-interactive crontab -l is unexpected.

Code Example

terminal:
  backend: local
  modal_mode: auto
  cwd: .
  timeout: 180

---

0 20 * * * /Users/<user>/backup_test.sh >> /Users/<user>/backup.log 2>&1

---

whoami
   id
   echo $USER $LOGNAME $HOME
   crontab -l
RAW_BUFFERClick to expand / collapse

Summary

With terminal.backend: local on macOS, Hermes appears to execute shell commands as the same user as the invoking shell, but crontab -l returns a different result when run through Hermes vs. when run directly in the user's terminal. This suggests either the command is not actually being executed, or its stdout is not faithfully captured/propagated by the terminal tool.

Environment

  • OS: macOS (Apple Silicon, MacBook Pro)
  • Shell: zsh
  • Hermes config (~/.hermes/config.yaml):
terminal:
  backend: local
  modal_mode: auto
  cwd: .
  timeout: 180

Steps to reproduce

  1. In the user shell, create a simple user crontab entry, e.g.:

    0 20 * * * /Users/<user>/backup_test.sh >> /Users/<user>/backup.log 2>&1
  2. In the user shell run:

    whoami
    id
    echo $USER $LOGNAME $HOME
    crontab -l
  3. In a Hermes session (same machine, same user), ask the agent to run the exact same commands via its terminal tool.

Expected behavior

Since both processes run as the same UNIX user with the same $HOME, crontab -l should return identical output in both contexts.

Actual behavior

  • whoami, id, echo $USER $LOGNAME $HOME match exactly between the user shell and Hermes (same user marco, uid 501, $HOME=/Users/marco).
  • crontab -l in the user shell correctly prints the configured cron entry.
  • crontab -l executed through Hermes returns no crontab for marco (i.e. empty), despite running as the same user on the same host.

Additional notes

  • Attempting to install a shell wrapper around /usr/bin/crontab to verify whether Hermes actually invokes the binary is not possible on recent macOS because /usr/bin is on the Signed System Volume and mv/tee fail with Operation not permitted even under sudo.
  • Interactive TUI commands (e.g. crontab -e, vim) are also refused by the agent, which may be by design, but the inconsistency on the non-interactive crontab -l is unexpected.

Impact

Users cannot rely on Hermes' reported output for system-level commands (cron, backups, permissions) when using backend: local on macOS, because the observed output diverges from the ground truth visible in a normal shell.

Possible causes to investigate

  • The terminal tool may not be actually executing the command and is instead synthesizing the output.
  • A bug in stdout capture / PTY handling for specific binaries like crontab.
  • Environment differences (e.g. a modified PATH or sandboxing) that cause a different crontab binary to be invoked.

extent analysis

TL;DR

The issue can be mitigated by investigating environment differences or stdout capture issues in the Hermes terminal tool, potentially caused by a bug in PTY handling for specific binaries like crontab.

Guidance

  • Verify the PATH environment variable in both the user shell and the Hermes session to ensure the same crontab binary is being invoked.
  • Check for any sandboxing or environment modifications in the Hermes configuration that could affect the execution of crontab.
  • Test the execution of other system-level commands through Hermes to see if the issue is specific to crontab or a more general problem.
  • Consider using a debugging tool or wrapper script to inspect the environment and execution of commands within the Hermes session.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The issue may be specific to the local backend on macOS, and the root cause could be related to the terminal tool's handling of certain binaries or environment variables. Further investigation is needed to determine the exact cause.

Recommendation

Apply a workaround by modifying the Hermes configuration or environment to match the user shell's settings, as the issue seems to be related to environment differences or stdout capture problems.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Since both processes run as the same UNIX user with the same $HOME, crontab -l should return identical output in both contexts.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Terminal backend (local) reports inconsistent `crontab -l` output compared to user shell (same UID)