Skip to content

[Feature]: Shared bootstrap files across all agents #19620

@Diaspar4u

Description

@Diaspar4u

Summary

Multi-agent setups need a way to share bootstrap context (rules, persona, instructions) across all agents without duplicating files in each workspace.

Problem

Bootstrap files (SOUL.md, AGENTS.md, etc.) are per-workspace. When running multiple agents that should follow the same rules, there's no built-in mechanism to maintain a single source of truth. The existing bootstrap-extra-files hook restricts files to within the workspace directory and only loads recognized bootstrap basenames.

Proposed Solution

A new bundled hook (shared-bootstrap) that auto-discovers SHARED_*.md files from <stateDir>/shared/ (default ~/.openclaw/shared/) and injects them into every agent's Project Context during agent:bootstrap.

  • Zero configuration — drop files in the directory, restart, every agent gets them
  • Only files matching SHARED_*.md are loaded (prefix prevents confusion with per-workspace files)
  • Files are sorted alphabetically and appended after workspace bootstrap files
  • No subagent filtering — shared files appear in every session type
  • Missing directory is silent; unreadable directory or files are fatal errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleMarked as stale due to inactivity

    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