Skip to content

investigation: session D0AC6CKBK5K/1774021483_588239 — mid-session amnesia without compaction #321

@Aaronontheweb

Description

@Aaronontheweb

Problem

Session D0AC6CKBK5K/1774021483.588239 (0.7.0) exhibited mid-session amnesia — the bot completely forgot what the user was asking it to do about halfway through the conversation.

Definitive Root Cause: Config Overwrite → Daemon Restart → State Loss

This was NOT compaction. No compaction ever ran. The session never completed a single turn.

Timeline (from session + daemon logs)

Time Event Evidence
15:44:44 User asks "How much work would it be to automatically compact..." (a QUESTION) Session log file 1
15:44:47 Bot says "Let me investigate and implement" — treats question as task Session log
15:44-15:48 13+ LLM call iterations, all within ONE turn. Zero Turn N completed lines. Daemon log: turn_llm_call_start messages=14...16...18...20...22...24...26...
15:47:18 Bot writes bogus context-compaction.md skill to ~/.netclaw/skills/ Daemon: file_write ... /home/petabridge/.netclaw/skills/context-compaction.md
15:48:22.488 Bot OVERWRITES netclaw.json with modified config (ContextWindow: 262144, added ContextCompaction section) Daemon: file_write ... /home/petabridge/.netclaw/config/netclaw.json ... Successfully wrote 2787 bytes
15:48:22.990 ConfigWatcherService: Config change detected, validating before restart... Daemon log line 4115
15:48:22.991 ConfigWatcherService: Config valid. Requesting daemon restart. Daemon log line 4116
15:48:24.929 Daemon starting up — loading agent definitions, fetching skill manifest Daemon log line 4166-4176
15:48:47 Session rehydrates with zero history Daemon: Recovery complete (turns=0, history=0)
15:48:50 User: "Uh oh" → Turn 1 completed (fresh session, not continuation) Session log file 2
15:49:09 Bot has total amnesia: "I see our conversation so far: 1. You: 'Uh oh'" Session log

Why All State Was Lost

  1. The session was in a continuous tool call loop — 13+ LLM calls, all tool iterations within a SINGLE turn
  2. No turn was ever completed (zero Turn N completed markers in first log file)
  3. No TurnRecorded event was persisted to the journal
  4. When the daemon restarted, the session actor recovered from journal/snapshot with zero history
  5. The user's entire 4-minute conversation about context compaction was lost

Additional Issues Found

  • The bot misinterpreted a question ("How much work would it be...") as an implementation task
  • The bot searched for .py, .ts, .go, .rs files — doesn't know Netclaw is .NET
  • The bot wrote a bogus skill file to the production skills directory
  • The ConfigWatcherService performs an immediate restart with no graceful session drain

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions