hermes - 💡(How to fix) Fix memory setup wizard accepts empty input for required fields [2 pull requests]

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…

Discovered while fixing radimsem/remindb#169 — a downstream memory provider plugin (radimsem/remindb) that was hitting the empty-config end state because of an unrelated bug in the plugin's post_setup hook. After that bug was fixed, the wizard's empty-input behavior surfaced as the next confusing UX step.

Happy to PR if there's interest.

Error Message

If a user presses Enter on a required: True field with no default, val is empty, the if val: block is skipped, but the wizard still proceeds to set memory.provider = <name> and write config.yaml. The provider then fails at first use with whatever error its initialize() / _ensure_client() / equivalent raises — and the user sees no explicit "this field is required" feedback.

Root Cause

  1. Install (or use a built-in) memory provider whose get_config_schema() returns at least one entry like:
    {"key": "SOME_PATH", "description": "Absolute path to ...", "required": True}
    (no default, no env_var).
  2. Run hermes memory setup, pick that provider.
  3. Press Enter on each prompt without typing anything.
  4. The wizard prints Memory provider: <name> / Activation saved to config.yaml.
  5. Check the provider's native config file (e.g. ~/.hermes/<name>.json) — the required key is missing.
  6. Start a Hermes session — the provider errors on first use because its config is empty.

Fix Action

Fixed

Code Example

val = _prompt(desc, default=str(effective_default) if effective_default else None)
if val:
    provider_config[key] = val

---

{"key": "SOME_PATH", "description": "Absolute path to ...", "required": True}
RAW_BUFFERClick to expand / collapse

The interactive wizard at hermes_cli/memory_setup.py:323-332 (Hermes Agent v0.14.0) collects values for schema fields marked required: True but doesn't validate non-empty input:

val = _prompt(desc, default=str(effective_default) if effective_default else None)
if val:
    provider_config[key] = val

If a user presses Enter on a required: True field with no default, val is empty, the if val: block is skipped, but the wizard still proceeds to set memory.provider = <name> and write config.yaml. The provider then fails at first use with whatever error its initialize() / _ensure_client() / equivalent raises — and the user sees no explicit "this field is required" feedback.

Repro

  1. Install (or use a built-in) memory provider whose get_config_schema() returns at least one entry like:
    {"key": "SOME_PATH", "description": "Absolute path to ...", "required": True}
    (no default, no env_var).
  2. Run hermes memory setup, pick that provider.
  3. Press Enter on each prompt without typing anything.
  4. The wizard prints Memory provider: <name> / Activation saved to config.yaml.
  5. Check the provider's native config file (e.g. ~/.hermes/<name>.json) — the required key is missing.
  6. Start a Hermes session — the provider errors on first use because its config is empty.

Suggested fix

In the prompt loop at memory_setup.py:323-332, when field.get(\"required\") is True and val is empty after _prompt, either:

  • Re-prompt with \"this field is required\" until non-empty input is provided, or
  • Fail the wizard cleanly with \"missing required field <key>; setup aborted\" and don't write memory.provider.

Either preserves the contract that required: True means "the wizard won't proceed without a value."

Context

Discovered while fixing radimsem/remindb#169 — a downstream memory provider plugin (radimsem/remindb) that was hitting the empty-config end state because of an unrelated bug in the plugin's post_setup hook. After that bug was fixed, the wizard's empty-input behavior surfaced as the next confusing UX step.

Happy to PR if there's interest.

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 memory setup wizard accepts empty input for required fields [2 pull requests]