用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lukemcqueen/hermes-cortex --skill cron-agent-identity命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | cron-agent-identity |
| version | 1.0.0 |
| category | devops |
| description | Diagnose which agent/profile a Hermes cron session runs as. |
| license | MIT |
| platforms | ["linux","darwin"] |
~/brain/<wrongname>/, created the wrong mycortex_reader_<name> DB role,
sent messages from the wrong identity).HERMES_PROFILE / AGENT_NAME differ between a cron
session and the host's config files.cron/scheduler.py
constructs cron AIAgents with skip_memory=True (agent/agent_init.py).
A wrong profile name in a cron run therefore did NOT come from USER.md's
Name: field — don't waste a cycle on that theory. It came from the
cron session's environment.os.environ. tools/environments/local.py build_subprocess_env()
snapshots os.environ, scrubs secrets, and bridges gateway session
ContextVars (gateway/session_context.py _VAR_MAP — only
HERMES_SESSION_* / HERMES_CRON_* vars; AGENT_NAME is NOT in the map).
So "why did the cron env contain X" = "where did the gateway's runtime
os.environ get mutated" — not a per-job setting.ps eww on the gateway shows only the exec-time env. A runtime
os.environ mutation is invisible there. Don't conclude "gateway env has
no AGENT_NAME" from ps alone — that only proves it wasn't there at boot.HERMES_PROFILE → AGENT_NAME → hostname. The first non-empty env var
wins. Host-level identity: os-config.sh ensure_agent_identity() uses
AGENT_NAME env → ~/.hermes-cortex/agent.env → hostname (orchestrator
hosts only; non-orch hosts must provision agent.env). One inconsistent
script (install.sh learning-sender) hardcodes AGENT_NAME="${HOSTNAME%%.*}"
— hostname default, not design intent.cron_<jobid>_<timestamp> (e.g. cron_a28f8be0bc4e_20260806_112445).session_search(query='<distinct phrase from the run>', sort='newest'), then session_search(session_id=..., around_message_id=...)
to scroll to the first terminal call. The agent often echoes env vars
(echo "AGENT_NAME=$AGENT_NAME"); that tool result is ground truth.~/.hermes/cron/executions.db
executions table has job_id, pid, started_at. In-process ticker ⇒
pid == gateway pid.os.environ[...] =), check build_subprocess_env() + _VAR_MAP,
then look outside the core: shell rc files, launchd plist env, .env
loading, wrapper scripts. Hermes core has NO AGENT_NAME writer (verified
2026-08-06 by repo-wide grep) — so a wrong AGENT_NAME came from outside
the core's own code.SELECT rolname FROM pg_roles) and DBs (pg_database); the cron
agent may have created a role under its wrong identity (e.g.
mycortex_reader_joseph while the host is titus).skip_memory=True means cron agents never see it.ps eww for runtime env. Exec-time only.~/brain/<wrong>/ dirs, INDEX files). After fixing the env/identity, clean
those up deliberately — they're test artifacts, not knowledge.jobs.json record carries no env block for these vars —
workdir, enabled_toolsets, skills, prompt are the only knobs. The
env comes from the process, not the job.mycortex (user-owned) — dream layer, multi-tenancy, reader roles
cron-job-management (user-owned) — cron naming, delivery, toolsets
config-drift-diagnostics (user-owned) — stale connection-config names
the first wrong-identity dream run (cron session id, executions.db pid, gateway env, core-grep proof) + the mycortex.conf gbrain-name finding.