Skip to content

Tray chat repeatedly triggers first-run bootstrap prompt for an already configured workspace #729

@sorry123luck

Description

@sorry123luck

Summary

The Windows Tray/Companion chat can repeatedly trigger the first-run bootstrap prompt even when OpenClaw has already been configured and the workspace already contains OpenClaw memory/configuration files.

This is risky because the generated first-run prompt asks the agent to start the initial setup ritual and modify files such as SOUL.md, even though the user is not in a first-run state anymore.

Environment

  • OpenClaw Windows Companion: v2026.6.1
  • Gateway: OpenClaw v2026.6.1, running locally in WSL
  • Gateway URL: ws://127.0.0.1:18789
  • Windows user: Administrator
  • Existing workspace path shown by the UI: /home/administrator/.openclaw/workspace
  • Existing files shown by the UI include:
    • AGENTS.md
    • SOUL.md
    • TOOLS.md
    • IDENTITY.md
    • USER.md
    • HEARTBEAT.md
    • MEMORY.md

What happened

After the Tray was already connected and chat was usable, the app still injected a first-run style user message:

Hi! I just installed OpenClaw and you're my brand-new agent. Please start the first-run ritual from BOOTSTRAP.md, ask one question at a time, and before we talk about WhatsApp/Telegram, visit soul.md with me to craft SOUL.md: ask what matters to me and how you should be. Then guide me through choosing how we should talk (web-only, WhatsApp, or Telegram).

This happened more than once from the Tray/chat flow. The user already had an OpenClaw workspace and existing configuration/memory files, so this should not have been treated as a brand-new installation.

Expected behavior

The first-run bootstrap prompt should only be injected for a true first-run/new-workspace state.

If the workspace already has OpenClaw state such as SOUL.md, AGENTS.md, MEMORY.md, existing sessions, or a previously configured Gateway, the Tray should not automatically send the bootstrap ritual prompt.

At minimum, the app should ask for explicit user confirmation before injecting a prompt that can cause the agent to rewrite workspace/personality/config files.

Actual behavior

The Tray/chat path can inject the first-run prompt even though:

  • the Gateway is already connected,
  • the chat is usable,
  • the workspace already has OpenClaw configuration files,
  • the user is not intentionally starting a first-run setup.

Why this matters

This can cause the agent to perform setup actions against an already configured workspace. For an existing user, that can overwrite or drift important files such as SOUL.md or other workspace instructions.

Related prior work

This may be adjacent to #457, which fixed a zero-state chat/session-key trap around fresh installs and main / agent:main:main session handling.

The remaining issue here appears to be that the first-run/onboarding trigger can still fire from the Tray/chat path even when the current workspace is not actually new.

Suggested fix

  • Gate first-run prompt injection on a durable "first run completed" marker, not only on current UI/session state.
  • Treat an existing configured workspace as not first-run.
  • Do not auto-send the bootstrap prompt from the Tray mini chat unless the setup state is definitely fresh.
  • If the state is ambiguous, show an explicit confirmation before sending the prompt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossThis issue is about lost, corrupted, or silently dropped user/session/config data.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    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