📊 Hermes / Codex / Antigravity 统一记忆审计报告

审计时间:2026-05-30 12:55 Asia/Shanghai

范围:Hermes、Codex、Antigravity、Telegram bridge、Report Center、VPS inventory、DR/backup 及 SSL 相关记忆表面的本地只读审计

安全:未修改、合并、删除、消费或重写任何记忆/上下文/日志/会话/inbox/changelog 文件。Secret 仅标识路径和类型,不打印值。

# Hermes / Codex / Antigravity Unified Memory Audit

Audit time: 2026-05-30 12:55 Asia/Shanghai

Scope: local read-only audit of Hermes, Codex, Antigravity, Telegram bridge, Report Center, VPS inventory, DR/backup and SSL-related memory surfaces.

Safety: no Hermes/Codex/Antigravity memory, context, log, session, inbox or changelog files were modified, merged, deleted, consumed or rewritten. Secrets are not printed; secret-bearing locations are identified by path and type only.

Executive Verdict

Current conclusion: 部分可用

Availability score: 5 / 10

The current unified memory mode has useful building blocks: Hermes profile memories, memory_tencentdb, a Hermes changelog inbox, a VPS inventory source-of-truth, CCTB completion mirrors, startup contexts, restart contexts and Report Center outputs. However, it is not yet a reliable unified memory system. There is no single enforced canonical memory source for Hermes + Codex + Antigravity together, recent facts are split across inbox/TencentDB/VPS inventory/reports, Codex long-term memory and SYSTEM_FULL_MANUAL.md are stale, Antigravity knowledge is older and unsynchronized, and CCTB mirrors are write-only best-effort rather than a full handoff protocol.

Largest blocker: canonical-source split-brain. The same facts are maintained in inventory.json, Hermes changelog inbox, Codex long-term memory, SYSTEM_FULL_MANUAL.md, Hermes TencentDB memory and Antigravity knowledge with different freshness.

Largest risk: silent stale recovery. A restarted Codex/Antigravity/Hermes agent can restore from old inventory or old service topology and act on obsolete assumptions, especially around VPS list, US/TK status, Ollama, CLIProxyAPI, Hermes Web UI and agent naming.

Minimum viable fix: freeze one explicit cross-system canonical index, make all systems read it at startup, and add an append-only handoff ledger with consumption acknowledgements. Do not start by merging all memories; start by defining boundaries and freshness checks.

Key Evidence

EvidencePath / SourceFinding
Hermes inbox/root/.hermes/HERMES_CHANGELOG_INBOX.mdNon-empty, modified 2026-05-30 10:55, contains recent durable changes not folded into Codex memory/manual.
Codex long-term memory/root/.codex/LONG_TERM_MEMORY.mdModified 2026-05-26; header says last updated 2026-05-24; stale on VPS fleet and service facts.
System manual/root/SYSTEM_FULL_MANUAL.mdModified 2026-05-24; still references old fleet, Ollama, older CLIProxyAPI, Hermes Web UI.
Hermes startup context/root/.hermes/STARTUP_CONTEXT.mdModified 2026-05-12; useful routing rules but stale on current profile set and services.
VPS inventory/root/.hermes/vps_inventory/inventory.json and README.mdCurrent VPS source of truth, modified 2026-05-30 09:00; active US is 186.241.84.19; TK removed from current inventory.
Hermes runtime memory/root/.memory-tencentdb/*/memory-tdai/Current high-value runtime memory for Master/Worker/Network/Health/Stock, but not universal and not automatically read by Codex/Antigravity startup.
CCTB Codexcctb-codex.service, /root/.cctb/codex/config.jsonTelegram to Codex bridge is running; approval mode is bypass; completed turns are mirrored to Master TDAI.
CCTB Antigravitycctb-antigravity.service, /usr/local/bin/agy-codex-wrapperTelegram to Antigravity wrapper is running; uses Antigravity CLI state and mirrors completed turns to Master TDAI.
Antigravity knowledge/root/.gemini/antigravity/knowledge/*/metadata.jsonLast modified 2026-05-05; contains stale Hermes topology and old agent names.
Report Center/var/www/reports/, /var/lib/report-center/metadata.jsonlReports are actively produced, but no evidence of systematic folding into canonical memory.

Coverage Notes

AreaPaths / Sources ReviewedResult
Hermes home and profiles/root/.hermes/, /root/.hermes/profiles/*/Active profiles are default/Master, Worker, Network, News, Health, Stock and Sub.
Hermes agent source and units/root/.hermes/hermes-agent/, hermes-gateway*.servicesystemd starts python -m hermes_cli.main ... gateway run --replace; source/config supports profile-scoped gateways.
Hermes startup/manual/changelog/root/.hermes/STARTUP_CONTEXT.md, /root/SYSTEM_FULL_MANUAL.md, /root/.hermes/HERMES_CHANGELOG_INBOX.mdStartup/manual are stale relative to inbox and inventory; inbox is unconsumed.
Hermes long-term/runtime memory/root/.hermes/memories/, /root/.memory-tencentdb/, Hermes state DBsRuntime memory is fresh but split by profile and not a universal startup source.
Hermes logs/audit/session/run state/root/.hermes/logs/, state.db, gateway_state.json, systemd journal samplesAPI server pause, Telegram polling/timeouts and memory gateway recovery issues observed.
Hermes reports/var/www/reports/, /var/lib/report-center/metadata.jsonlRecent reports exist for health, worker, news, network, ops, stock and sub.
Hermes inbox/outbox/task queueChangelog inbox, cron/task records from Hermes state, Report Center outputsInbox and reports are produced, but no global consumption acknowledgement exists.
Codex/root/.codex/, cctb-codex.service, Codex process listCodex memory is stale; CCTB Codex is active and bypass mode is present.
Antigravity/root/.gemini/antigravity/, /root/.gemini/antigravity-cli/, cctb-antigravity.service, /usr/local/bin/agy-codex-wrapperLegacy knowledge is stale; CCTB wrapper is active but best-effort and timeout-prone.

Hermes Agent Relationship Map

flowchart TD

TG[Telegram Bridge / Hermes gateways] --> M[Hermes Master / default]

TG --> W[Worker]

TG --> N[Network]

TG --> NEWS[News]

TG --> H[Health]

TG --> S[Stock]

TG --> SUB[Sub]

M --> RT[/Report Center /var/www/reports/]

W --> RT

N --> RT

NEWS --> RT

H --> RT

S --> RT

SUB --> RT

M --> CHG[/Hermes changelog inbox/]

W --> CHG

N --> CHG

NEWS --> CHG

H --> CHG

S --> CHG

SUB --> CHG

M <--> MT[/memory_tencentdb master/]

W <--> MWT[/memory_tencentdb worker/]

N <--> MNT[/memory_tencentdb network/]

H <--> MHT[/memory_tencentdb health/]

S <--> MST[/memory_tencentdb stock/]

NEWS -. no TencentDB provider observed .-> NL[/local state/logs/]

SUB -. no TencentDB provider observed .-> SL[/local state/logs/]

N --> VPS[/VPS inventory inventory.json/]

M --> VPS

VPS --> N

CCTBC[CCTB Codex] --> COD[Codex CLI]

CCTBA[CCTB Antigravity] --> AGY[Antigravity CLI wrapper]

COD --> MT

AGY --> MT

CXL[/Codex LONG_TERM_MEMORY.md/] --> COD

HIN[/Hermes CHANGELOG_INBOX.md/] --> COD

COD -. intended fold, currently not performed in this audit .-> CXL

COD -. intended manual update .-> MAN[/SYSTEM_FULL_MANUAL.md/]

AGK[/Antigravity knowledge/session/] --> AGY

AGY -. completed turns via CCTB only .-> MT

DR[DR / backup scripts] --> RT

SSL[SSL / nginx / CLIProxy facts] --> MAN

SSL --> CHG

SSL --> MT

Relationship summary:

Agent Responsibility Matrix

AgentRoleInput SourcesOutput TargetsReads MemoryWrites MemoryDepends OnConsumed ByRecent WorkRisk Notes
Master / defaultComplex local planning, deep troubleshooting, cross-system coordination, report publishingTelegram gateway, local system files, Hermes state, CCTB mirrors, reports, Codex handoffsReport Center, Hermes changelog inbox, Master TDAI memory, logs/root/.hermes/SOUL.md, /root/.hermes/STARTUP_CONTEXT.md, /root/.hermes/memories/*, /root/.memory-tencentdb/master, selected system files/root/.memory-tencentdb/master, /root/.hermes/HERMES_CHANGELOG_INBOX.md, reports/logsHermes gateway, CLIProxyAPI, Report Center, memory_tencentdbUser, Codex via memory/inbox, other agents indirectlyClipoxy panel/Codex linkage, US IP/subscription update, Ollama cleanup, project update audit, system memory analysisRecent facts are richer than Codex LTM/manual; if not folded, recovery diverges.
WorkerRoutine local AR operations, email/daily checks, non-invasive local tasksTelegram gateway, local project files, cron jobsReport Center, Worker TDAI memory, logs, possible changelog entriesWorker SOUL, startup context, Worker config, /root/.memory-tencentdb/workerWorker TDAI memory, reports/logsHermes gateway, local filesystem, Report CenterUser and Master by report readingDaily email inspector, project zip delivery, local project updatesRole overlaps with Master for local tasks unless routing remains enforced.
NetworkRemote VPS maintenance and inspection, VPS model sync, inventory accuracyTelegram gateway, /root/.hermes/vps_inventory/, network cron tasks, SSH configNetwork reports, inventory updates when authorized, Network TDAI memory, changelog entriesNetwork SOUL, startup context, VPS inventory, /root/.memory-tencentdb/networkNetwork TDAI memory, reports, inventory when instructedVPS inventory, SSH key path, Hermes gateway, Report CenterUser, Master, Codex audit workflowsUS IP whitelist sync, VPS list inspection, /cliusage add/remove verification, non-AR VPS update checksInventory is current, but other memory layers still disagree. SG notes contain minor internal contradiction.
ArtistFormer profile name for remote/VPS opsHistorical Antigravity knowledge and older docsNone observed as active serviceStale references onlyNone observedN/AN/ANo active service observed; renamed/replaced by NetworkStale Antigravity knowledge still references Artist and may misroute tasks.
NewsDaily finance/news/AI briefing botTelegram gateway, scheduled news cron, web/news sources, local config/var/www/reports/news/, logs, Telegram repliesNews SOUL, startup context, local state/logsReports/logs; no TencentDB provider observed in current configHermes gateway, Report Center, model providerUser and Report Center readersDaily finance briefing, AI news briefingRecent missing bs4 error; memory persistence weaker than TencentDB-backed agents.
HealthHealth records, reminders, summariesTelegram gateway, health data, health cron tasksHealth reports, Health TDAI memory, logsHealth SOUL, startup context, /root/.memory-tencentdb/healthHealth TDAI memory, reports/logsHermes gateway, Report CenterUserWeight update, breakfast nutrition analysis, health daily cron, iOS health data repairContains personal health data; should remain scoped and not be folded into broad ops memory except metadata.
StockAgricultural inventory/supply and project stock reportsTelegram gateway, stock project files, agricultural inventory records/var/www/reports/stock/, Stock TDAI memory, logsStock SOUL, startup context, /root/.memory-tencentdb/stockStock TDAI memory, reports/logsHermes gateway, Report CenterUser/project opsFertilizer arrival gap, seed demand and inventory checksDomain-specific memory should not be mixed into system ops canonical memory except task index.
SubLoveason /sub/ project data maintenanceTelegram gateway, Sub project files, SQLite/backend/frontend context/var/www/reports/sub/, logs, project outputsSub SOUL, startup context, local project contextReports/logs/project files when authorized; no TencentDB provider observedHermes gateway, Report Center, project database/filesUser and project workflowJD Plus renewal note, Sub project sessionsNo TencentDB provider observed; project state can diverge from broader memory if only in sessions/reports.
Hermes gatewayTelegram/API gateway for profilessystemd units, profile configs, bot env vars, Telegram APIAgent sessions/messages/logs, gateway stateProfile configs/env, gateway statestate.db, gateway_state.json, logsTelegram, profile processesAll Hermes agentsActive for all profiles; API server side pausedRepeated API_SERVER_KEY is required; Telegram polling conflicts/timeouts observed.
Report CenterHTML/report publishing and metadata indexReports from Hermes agents, metadata writer/var/www/reports/, /var/lib/report-center/metadata.jsonlReport metadata and static filesReport metadata/static reportsnginx, reportcenter serviceUser, agents, Codex auditorsActive service and recent reports across health/worker/news/network/ops/stockValuable outputs lack guaranteed ingestion into durable canonical memory.
CCTB CodexTelegram-to-Codex execution bridgeTelegram messages, .cctb/codex config/env, Codex CLICodex session output, CCTB logs/audit, Master TDAI completed-turn mirrorCCTB config/agent.md, Codex stateCCTB runtime logs; Master TDAI mirror via gatewayCodex CLI, Telegram, Master TDAI gatewayUser, Master memory readersService active; completed turns mirror enabledApproval mode bypass; mirror is not a full sync or acknowledgement protocol.
CCTB AntigravityTelegram-to-Antigravity execution bridgeTelegram messages, .cctb/antigravity config/env, agy-codex-wrapperAntigravity CLI output, wrapper logs, Master TDAI completed-turn mirrorCCTB config/agent.md, Antigravity CLI stateCCTB/wrapper logs; Master TDAI mirror via gatewayAntigravity CLI, Telegram, Master TDAI gatewayUser, Master memory readersService active; some 30-minute inactive timeoutsAntigravity legacy knowledge remains stale; wrapper best-effort output extraction is fragile.

Memory Source Inventory

PathOwnerReaderWriterPurposeLast ModifiedApprox SizeContains SecretsCanonicalRisk Notes
/root/.hermes/vps_inventory/inventory.jsonHermes Network / operatorNetwork, Master, auditsNetwork/operator when authorizedVPS operational inventory2026-05-30 09:0010 KBnoyes, for VPS inventoryCurrent source of truth; other memory layers disagree.
/root/.hermes/vps_inventory/README.mdHermes Network / operatorNetwork, Master, auditsNetwork/operator when authorizedHuman inventory summary2026-05-30 09:002.6 KBnoyes, summary onlySays inventory.json is source of truth.
/root/.hermes/HERMES_CHANGELOG_INBOX.mdHermes agentsCodex startup, operatorHermes agentsDurable change handoff inbox2026-05-30 10:558 KBsuspectedno, handoff queueNon-empty and unconsumed; proves handoff backlog.
/root/.codex/LONG_TERM_MEMORY.mdCodex/operatorCodex startupCodex when allowedCodex durable operating memory2026-05-26 22:4151 KBsuspectedintended for Codex onlyStale vs inbox/inventory; not current canonical truth.
/root/SYSTEM_FULL_MANUAL.mdOperator/CodexHumans/agentsCodex/operator when allowedSystem manual2026-05-24 10:4833 KBsuspectednoStill has old fleet/service topology.
/root/.hermes/STARTUP_CONTEXT.mdHermes/operatorHermes agentsOperator/Codex when allowedHermes startup routing and conventions2026-05-12 15:036 KBnopartialHelpful but stale and not enough for current state recovery.
/root/.hermes/memories/MEMORY.mdHermes built-in memoryHermes agentsHermes/operatorCompact Hermes memory index2026-05-29 14:072.2 KBsuspectedpartialUseful but missing some 2026-05-30 facts.
/root/.hermes/memories/USER.mdHermes built-in memoryHermes agentsHermes/operatorUser preferences2026-05-29 10:322.0 KBnopartialGood scope; should not carry operational topology.
/root/.memory-tencentdb/master/memory-tdai/Master memory providerMaster; CCTB writes through gatewayMaster, CCTB completion mirrorMaster semantic/runtime memoryactive 2026-05-30directorysuspectedpartialHigh freshness but not a universal startup source.
/root/.memory-tencentdb/worker/memory-tdai/Worker memory providerWorkerWorkerWorker runtime memoryactive 2026-05-30directorysuspectedpartialProfile-scoped only.
/root/.memory-tencentdb/network/memory-tdai/Network memory providerNetworkNetworkNetwork/VPS runtime memoryactive 2026-05-30directorysuspectedpartialMust reconcile to inventory, not replace it.
/root/.memory-tencentdb/health/memory-tdai/Health memory providerHealthHealthHealth runtime memoryactive 2026-05-30directorysuspected personalpartialSensitive personal-data boundary needed.
/root/.memory-tencentdb/stock/memory-tdai/Stock memory providerStockStockStock runtime memoryactive 2026-05-29/30directorysuspectedpartialDomain-specific; should not pollute system ops memory.
/root/.hermes/state.dbHermes gatewayHermes agents/gatewayHermes gatewaySessions/messages/runtime state2026-05-30 10:55434 MBsuspectednoVery large; not suitable as startup memory.
/root/.hermes/profiles/*/state.dbHermes profile gatewaysProfile agentsProfile gatewaysProfile sessions/messagesactive 2026-05-3016-93 MB eachsuspectednoUseful audit trail; high read cost.
/root/.hermes/restart-context/Hermes agents/operatorHermes startup/manual recoveryHermes agents/operatorRestart/handoff context filesactivedirectorysuspectednoMany files; lacks enforced freshness/consumption status.
/root/.hermes/logs/Hermes servicesOperators/auditorsHermes servicesRuntime logs and errorsactiveMB-scalesuspectednoContains errors and prompts; not a memory source.
/root/.hermes/SOUL.md and /root/.hermes/profiles/*/SOUL.mdHermes/operatorHermes agentsOperator/Codex when allowedAgent identity/routing rulesmixed 2026-05-12 to 2026-05-16KB-scalenoyes, for agent roleRole canonical, but older external knowledge still conflicts.
/root/.cctb/codex/config.jsonCCTB CodexCCTB serviceOperatorTelegram bridge runtime configactivesmallnoyes, for bridge configShows bypass mode; no memory completeness guarantee.
/root/.cctb/codex/.envCCTB CodexCCTB serviceOperatorBot/env secretsactivesmallyesnoSecret-bearing; keep out of reports.
/root/.cctb/antigravity/config.jsonCCTB AntigravityCCTB serviceOperatorTelegram bridge runtime configactivesmallnoyes, for bridge configUses Antigravity wrapper; bypass mode.
/root/.cctb/antigravity/.envCCTB AntigravityCCTB serviceOperatorBot/env secretsactivesmallyesnoSecret-bearing; keep out of reports.
/root/.gemini/antigravity/knowledge/Antigravity legacy knowledgeAntigravity legacy flows/auditsAntigravity/operatorKnowledge entries2026-05-05directorysuspectednoStale Hermes topology; one audit report contains a plaintext Nezha secret value.
/root/.gemini/antigravity-cli/Antigravity CLIAntigravity CLI/wrapperAntigravity CLICurrent Antigravity settings/logs/conversationsactive 2026-05-29/30directoryyes/suspectednoContains token/settings/conversation state; not folded into unified memory.
/root/.codex/auth.json and backupsCodex/CLIProxy syncCodex CLICLIProxy sync/watchers/operatorCodex auth credentialsactivefilesyesnoMultiple backups raise retention/leakage risk.
/root/.codex/sessions/Codex CLICodex/auditorsCodex CLICodex session historyactivedirectorysuspectednoUseful audit trail; not summarized into canonical memory.
/var/www/reports/Report Center / agentsUsers/agents/auditorsHermes agents/Report CenterPublished reportsactive 2026-05-30directorysuspectednoValuable facts can remain unconsumed.
/var/lib/report-center/metadata.jsonlReport CenterReport Center/auditorsReport CenterReport index2026-05-30 10:23108 KBsuspectednoGood index, but no canonical ingestion step.
/root/.config/local-dr/restic-passwordDR backupRestic scriptsOperatorBackup secretactivesmallyesnoSecret-bearing; exclude from memory.
/root/.config/local-dr/restic-rest-authDR backupRestic scriptsOperatorBackup authactivesmallyesnoSecret-bearing; exclude from memory.
/opt/report-center/.envReport CenterReport Center serviceOperatorService env/secretsactivesmallyesnoSecret-bearing.
/root/cliproxyapi/config.yaml and backupsCLIProxyAPICLIProxyAPI/Codex syncOperator/serviceProvider/model/auth configactivefilesyesnoHigh-value secret/config surface; do not fold raw content.

Cross-System Interaction Matrix

Source SystemTarget SystemInteraction TypeEvidence PathDirectionFrequencyReliabilityRisk
HermesCodexChangelog handoff intended for Codex startup consumption/root/.hermes/HERMES_CHANGELOG_INBOX.md, /root/.codex/AGENTS.mdHermes -> CodexEvent-drivenWeak currentlyInbox is non-empty and not folded during this audit by user constraint.
CodexHermesReads Hermes inbox/memory per startup policy; can generate audits/reports/root/.codex/AGENTS.md, this report pathCodex -> Hermes/operatorSession startup/manualPartialCodex LTM stale if inbox not consumed.
CCTB CodexCodexTelegram task execution through Codex CLIcctb-codex.service, /root/.cctb/codex/config.jsonTelegram -> CodexOn Telegram tasksMediumApproval bypass enabled; session outputs not guaranteed canonical.
CCTB CodexHermes Master memoryCompleted-turn mirror to Master TDAI gatewaycctb-codex.service env CCTB_TDAI_MIRROR_ENABLED=1Codex -> HermesPer completed turnBest-effortNo consumption acknowledgement or conflict resolution.
CCTB AntigravityAntigravity CLITelegram task execution via wrappercctb-antigravity.service, /usr/local/bin/agy-codex-wrapperTelegram -> AntigravityOn Telegram tasksMedium/fragileWrapper uses output extraction fallback; observed inactive timeouts.
CCTB AntigravityHermes Master memoryCompleted-turn mirror to Master TDAI gatewaycctb-antigravity.service env CCTB_TDAI_MIRROR_ENABLED=1Antigravity -> HermesPer completed turnBest-effortDoes not sync Antigravity knowledge/session state broadly.
Antigravity legacy knowledgeHermes understandingStale reference knowledge about Hermes agents/topology/root/.gemini/antigravity/knowledge/*/metadata.jsonAntigravity -> operator/agent reasoningOn Antigravity useLowReferences old Artist role and old fleet facts.
Hermes NetworkVPS inventoryRead/write operational VPS source of truth/root/.hermes/vps_inventory/inventory.jsonNetwork <-> inventoryDuring VPS tasksHigh locallyOther systems still carry stale copies.
Report CenterHermes/Codex/userPublishes long reports and indexes/var/www/reports/, /var/lib/report-center/metadata.jsonlAgents -> reports -> readersFrequentMediumReports are not automatically reduced into canonical memory.
DR/backup scriptsReport Center / logsBackup scope review and backup status reportsroot cron, local-dr timers/logsDR -> reports/logsTimedMixedWeekly review skipped because missing skill; old backup facts may persist.
SSL/nginx/CLIProxy factsHermes/Codex memoryOperational facts captured in reports/inbox/manualHermes inbox, TDAI, SYSTEM_FULL_MANUAL.mdOps -> memory layersEvent-drivenMixedManual stale on Ollama, CLIProxyAPI and Hermes Web UI.
CLIProxyAPICodex authAuth sync into Codex CLI credentialscliproxy-codex-cli-auth-sync.*, codex-auth-autosync-watcher.serviceCLIProxy -> CodexWatch/event-drivenMediumMultiple credential backups; secret retention risk.
Telegram bridgeHermes profilesUser-facing agent trigger and transporthermes-gateway*.service, gateway state/logsTelegram -> HermesContinuousMediumPolling conflicts/timeouts and API server pause observed.

Unified Memory Usability Assessment

1. Canonical Memory Source

There is no single canonical memory source for the whole Hermes + Codex + Antigravity ecosystem.

Narrow canonical sources do exist:

Current write/read ownership is therefore fragmented:

2. Shared Facts Across Hermes / Codex / Antigravity

Shared facts are inconsistent.

3. Memory Split-Brain

Split-brain is present.

Concrete examples:

4. Memory Decay

Decay is present.

5. Memory Overload

Overload is present but manageable.

6. Memory Leakage

Leakage risk is high. This audit did not print secret values.

Confirmed or suspected secret-bearing paths:

Sampled shell history did not reveal a clear token value, but history remains in scope for periodic scanning.

7. Handoff Failure

Handoff failure is present.

8. Final Usability Answer

The unified memory mode is 部分可用:

Recent Errors And Abnormal Signals

AreaEvidenceRisk
Hermes API server platformHermes journal/logs show repeated API_SERVER_KEY is required, then API server platform pausedNon-Telegram integrations may be unavailable or silently stale.
Telegram transportHermes/CCTB logs show polling conflicts, network errors and read timeoutsDuplicate polling or transient outages can create missed/duplicated tasks.
memory_tencentdbLogs show gateway-down resurrection and earlier import/symlink issuesRuntime memory is important but had recent availability issues.
Curator/model callsLogs show HTTP 401 invalid API key for one model pathSome scheduled model-dependent tasks may silently fail.
News dependenciesLogs show missing bs4 in a news pathScheduled news job reliability issue.
DR scope reviewCron skipped because required skill was missingBackup scope review report pipeline is not fully reliable.
Antigravity wrapperWrapper logs show fallback output extraction; CCTB Antigravity had 30-minute inactive timeoutsAntigravity task outputs can be incomplete or delayed.
Codex/CCTB approvalCurrent Codex process and CCTB configs show bypass/auto-approve style executionHigh blast radius if stale memory triggers wrong action.

Memory Refactor Proposal

This is a proposal only. No memory files were changed.

Canonical Source Recommendation

Create a small, explicit canonical memory index:

Canonical sub-sources:

Layering

LayerPurposeExample PathRule
Canonical stateCurrent truth onlyproposed CANONICAL_STATE.mdSmall, versioned, no secrets, every fact has owner/freshness.
Source-of-truth dataDomain canonical filesvps_inventory/inventory.json, SOUL filesOwned by domain agent/operator.
Inbox/changelogPending durable changesHERMES_CHANGELOG_INBOX.mdAppend-only; must be consumed or explicitly deferred with ack.
Handoff ledgerTask transfer stateproposed HANDOFF_LEDGER.jsonlEach item has producer, consumer, status, timestamp, evidence path.
Restart contextShort recovery contextrestart-context/Latest pointer only in canonical state; old files archived.
Long-term memoryAgent-specific durable memoryCodex LTM, Hermes TDAI, Antigravity knowledgeAgent-specific; should link to canonical state rather than duplicate current facts.
Reports/logs/sessionsEvidence and history/var/www/reports/, state DBs, logsRead-only audit trail; summarize before memory ingestion.

Read/Write Boundaries

System / AgentShould ReadMay WriteShould Not Write
Hermes MasterCanonical state, Hermes startup context, Master TDAI, handoff ledger, reportsMaster TDAI, reports, changelog inbox, handoff proposalsVPS inventory except through explicit operator-approved updates.
Hermes NetworkCanonical state, VPS inventory, Network TDAI, handoff ledgerVPS inventory, Network TDAI, network reports, changelog inboxCodex LTM, Antigravity knowledge, unrelated profile memories.
WorkerCanonical state, Worker TDAI, startup contextWorker TDAI, local reports, changelog entries for durable local changesVPS inventory, Codex LTM, Antigravity knowledge.
NewsCanonical state, News config/context, report indexNews reports/logs, changelog only for durable service changesSystem topology memory, VPS inventory.
HealthCanonical state, Health memory/contextHealth TDAI/reportsShared ops memory with personal detail.
StockCanonical state, Stock memory/contextStock TDAI/reportsShared ops memory with detailed project records unless summarized.
SubCanonical state, Sub project contextSub reports/project files when authorizedShared ops memory with raw project/session detail.
CodexCanonical state, Codex LTM, Hermes inbox, handoff ledgerCodex LTM only when allowed, reports under audit dirs, handoff ack/proposalsHermes/Codex/Antigravity raw memory during read-only audits.
AntigravityCanonical state, Antigravity session/knowledgeAntigravity session outputs and handoff proposalsHermes memory and Codex LTM directly.
CCTB bridgesBridge config, canonical routing summaryRuntime logs and completed-turn handoff eventsCanonical state directly, unless through a validated handoff writer.

Files That Should Become Read-Only For Most Agents

Files That Should Be Archived Or Compressed

Split-Brain Prevention

1. Every current fact in canonical state must have exactly one owner and one source path.

2. Duplicated facts in Codex LTM/manual/Antigravity knowledge should become links or summaries, not independent copies.

3. Startup should check freshness: if inbox or handoff ledger has unconsumed durable changes newer than canonical state, agent should warn before acting.

4. VPS tasks must always read /root/.hermes/vps_inventory/inventory.json first.

5. Agent identity/routing tasks must always read SOUL files first.

Secret Leakage Prevention

1. Secret-bearing paths must be tagged as “never ingest raw”.

2. Reports must redact token/API key/cookie/session/SSH/restic/Telegram/database credentials before publication.

3. Add a periodic local redaction audit for memory/report/session files.

4. Move any discovered secret-in-report incident to a restricted remediation queue without printing the value.

5. Avoid copying auth/config backups into general reports or long-term memory.

Handoff Protocol

Recommended handoff JSONL fields:

{"id":"20260530-001","source":"Hermes Network","target":"Codex","type":"durable_change","summary":"US IP changed to current inventory value","evidence":["/root/.hermes/vps_inventory/inventory.json"],"status":"pending","created_at":"2026-05-30T02:00:00Z","consumed_at":null,"consumer_ack":null}

Required states:

This would make changelog inbox, restart context, Codex reports and Antigravity sessions traceable without merging raw memories.

No-Downtime Improvement Steps

1. Generate a read-only canonical-state draft from current sources and review it manually.

2. Add a handoff ledger next to the existing inbox without deleting the inbox.

3. Add a startup freshness check that warns if inbox/ledger is newer than canonical state.

4. Add a report ingestion index that records “summarized / not summarized / ignored with reason”.

5. Mark secret-bearing paths in a denylist for memory ingestion and report generation.

6. Update Antigravity knowledge by adding a current-state pointer instead of copying all Hermes facts.

Maintenance-Window Improvement Steps

1. Rotate any credentials found in published memory/report files, especially the plaintext Nezha secret incident.

2. Prune or restrict old auth backups after confirming rollback needs.

3. Rebuild stale Antigravity knowledge and remove obsolete Artist/VPS topology entries.

4. Normalize Codex LTM and SYSTEM_FULL_MANUAL.md to reference canonical state instead of duplicating current facts.

5. Compact old Hermes restart contexts and profile session summaries into dated archives.

6. Validate CCTB mirror reliability and add acknowledgement/error reporting for failed TDAI writes.

Bottom Line

The system has the right primitives but lacks enforced memory ownership and consumption tracking. For a careful human operator, it is recoverable. For autonomous multi-agent continuity, it is currently only partially usable because stale memory can override current inventory and runtime facts. The safest next move is a small canonical-state layer plus handoff acknowledgements, not a large memory merge.