hermes - 💡(How to fix) Fix --daemon mode ignores --port flag, hardcodes DEFAULT_DAEMON_PORT (hindsight_embed)

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…

Root Cause

In hindsight_embed/daemon.py, the daemonize() function uses DEFAULT_DAEMON_PORT for the server startup. The --port argument is passed to the CLI but not forwarded to the forked daemon process.

Fix Action

Fix

Either:

  1. Pass the --port value through to the daemonized process (e.g., via environment variable or command-line argument)
  2. Or have the daemon read the port from the profile manager's metadata

Code Example

# Start daemon with explicit port
hindsight-embed -p hermes daemon start --daemon --port 9177

# Check which port it actually listens on
lsof -i :9177 -sTCP:LISTEN  # nothing
lsof -i :8889 -sTCP:LISTEN  # daemon is here
RAW_BUFFERClick to expand / collapse

Bug

When starting the hindsight daemon in --daemon mode, the --port CLI argument is ignored. The daemonized process always listens on DEFAULT_DAEMON_PORT (8889), hardcoded in hindsight_embed/daemon.py.

Reproduction

# Start daemon with explicit port
hindsight-embed -p hermes daemon start --daemon --port 9177

# Check which port it actually listens on
lsof -i :9177 -sTCP:LISTEN  # nothing
lsof -i :8889 -sTCP:LISTEN  # daemon is here

The profile manager allocates port 9177 for the "hermes" profile (via hash-based calculation from PROFILE_PORT_BASE=8889), but the daemon ignores this and listens on 8889.

Root Cause

In hindsight_embed/daemon.py, the daemonize() function uses DEFAULT_DAEMON_PORT for the server startup. The --port argument is passed to the CLI but not forwarded to the forked daemon process.

Fix

Either:

  1. Pass the --port value through to the daemonized process (e.g., via environment variable or command-line argument)
  2. Or have the daemon read the port from the profile manager's metadata

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…

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 --daemon mode ignores --port flag, hardcodes DEFAULT_DAEMON_PORT (hindsight_embed)