NousResearch/hermes-agent · error · ValueError
key must be non-empty
Error message
key must be non-empty
What it means
Error "key must be non-empty" thrown in NousResearch/hermes-agent.
Source
Thrown at cron/notepad.py:85
Mirrors ``cron.executions._transaction``: schema init runs inside the
``try`` so a PRAGMA/DDL failure still closes the connection instead of
leaking it.
"""
with _lock:
conn = _connect()
try:
_initialize_schema(conn)
with conn:
yield conn
finally:
conn.close()
def _validate(job_id: str, key: str, value: str) -> None:
if not str(job_id):
raise ValueError("job_id must be non-empty")
if not key:
raise ValueError("key must be non-empty")
if len(key) > MAX_KEY_CHARS:
raise ValueError(f"key too long (max {MAX_KEY_CHARS} characters)")
if len(value.encode("utf-8")) > MAX_VALUE_BYTES:
raise ValueError(
f"value too large (max {MAX_VALUE_BYTES} bytes per key)"
)
def set_note(job_id: str, key: str, value: str) -> Dict[str, Any]:
"""Upsert one key. Raises ValueError when a size cap would be exceeded."""
job_id, key, value = str(job_id), str(key), str(value)
_validate(job_id, key, value)
now = _hermes_now().isoformat()
with _transaction() as conn:
row = conn.execute(
"""SELECT COALESCE(SUM(LENGTH(CAST(key AS BLOB))
+ LENGTH(CAST(value AS BLOB))), 0)
FROM cron_notepad WHERE job_id=? AND key<>?""",View on GitHub (pinned to c896c09c42)
Solutions
- Provide a non-empty key for the notepad entry.
When it happens
Trigger: Thrown at cron/notepad.py:85 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/da0232e17ffb35f5.
Report an issue: GitHub.