Skip to content

bug(honcho): cron sessions write system instructions to Honcho as user messages, corrupting user representation #4052

@erosika

Description

@erosika

Bug

Cron sessions auto-activate Honcho and write the cron prompt to Honcho as a user message, causing Honcho's dialectic model to misattribute Hermes agent traits to the user.

Root cause

  1. cron/scheduler.py creates AIAgent without honcho_session_key or skip_memory=True
  2. Since skip_memory defaults to False, AIAgent.__init__ reads global Honcho config from ~/.honcho/config.json, creates a HonchoSessionManager, and activates Honcho
  3. Cron prompts contain system-level instructions like "You are Hermes, an AI assistant made by Nous Research... using model X and tool Y..."
  4. At the end of the conversation loop, _honcho_sync(original_user_message, final_response) writes this cron prompt as a user peer message to Honcho
  5. Honcho's observation/reasoning system sees this as the user speaking, and incorporates agent identity traits into the user representation

Impact

  • User representations accumulate false observations (e.g. "user stated they are Hermes, an AI assistant")
  • Cross-session context becomes unreliable
  • The _flush_memories_for_session guard in gateway/run.py already skips cron sessions for local memory — but the Honcho write path has no equivalent guard

Expected behavior

Cron sessions should not write messages to Honcho. They are headless autonomous tasks with no real user conversation.

Fix

Skip Honcho activation for cron sessions. The cron scheduler should either:

  • Pass skip_memory=True to suppress all memory writes, or
  • Guard _honcho_sync() against platform == "cron" (less clean — the session should never activate in the first place)

Related: #3276 (Honcho PR map)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions