Skip to content

Loss of persistent "brain" causes Zero to forget its own identity, drop MCP connections, and touch other agents' config #604

Description

@PatrickNoFilter

Loss of persistent "brain" causes Zero to forget its own identity, drop MCP connections, and touch other agents' config

Summary

Zero currently has no persistent memory/brain across restarts. This produces a
cluster of related failures that all stem from the same root cause: there is no
long-lived state that survives a session restart.
They should be treated as one
issue, not three separate ones.

Environment note: this was observed and reproduced on Android / Termux
(/data/data/com.termux/files/home, shell /bin/sh). On mobile/Termux the lack of
a persistent brain is especially painful because the agent cold-boots with no
record of its own identity or verified MCP state, and the surrounding OS/config
layout differs from a desktop Linux/macOS install. Any brain/memory solution must
work first-class on Termux (local, offline, no external service required).

Symptoms observed (single root cause)

  1. Forgets its own identity after restart.
    After a restart, Zero referred to itself as "OpenClaude" and described itself
    as coming from a different project, even though it is Zero
    (Gitlawb/zero). It had no persistent record of what it is.

  2. MCP connections are not reliably re-established / remembered.
    MCP servers registered in ~/.config/zero/config.json (e.g. as_brain,
    continuum, eling) were assumed "dead" after a restart simply because the
    agent had no memory of having verified them. The servers were actually fine;
    the agent lost track of their state. An unconfigured optional server
    (e.g. firecrawl with no API key) also emits a loud 401 on every startup.

  3. Touches other agents' config files.
    Because it forgot its identity and where its own config lives, the agent
    edited ~/.openclaude.json (a different application's config) instead of
    ~/.config/zero/config.json. Without a persistent brain, the agent cannot
    reliably distinguish "this is my config" from "this belongs to another tool."

Root cause

Zero has no durable brain/memory layer that persists across runs. Every restart
is effectively an amnesiac cold boot: identity, verified MCP state, and
config-file ownership all have to be re-derived from scratch, and when that
re-derivation is imperfect the agent misidentifies itself and other tools' state.

Proposed direction

  • Give Zero a persistent brain (local, offline-first) that survives restarts
    and records at minimum:
    • Its own identity/role (Zero, repo Gitlawb/zero).
    • Verified MCP server connection state (so it doesn't re-diagnose healthy
      servers as broken).
    • Ownership/trust boundary of config files (never edit another agent's config
      unless explicitly told).
  • The brain must work on Android / Termux (local filesystem under
    /data/data/com.termux/files/home), not depend on a desktop-only path or an
    external cloud service.
  • Harden MCP startup so unconfigured optional servers fail silently / are
    clearly marked optional instead of printing 401 noise on every launch.
  • On startup, load the persistent brain before any config-editing or
    identity-sensitive action.

Related (but distinct) existing issues

This issue is the unifying one: those are symptoms of the missing persistent
brain (made worse on Android/Termux).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions