Context: OpenClaw gateway on WSL/Ubuntu, backend google-gemini-cli (gemini-3.1-pro-preview) via oauth-personal. Workspace at ~/.openclaw/workspace/ has populated IDENTITY.md, USER.md, SOUL.md, BOOTSTRAP.md, MEMORY.md.
On /new the agent responds in English with the stock Gemini CLI persona and doesn't know its configured name/emoji. I installed a shim on the gemini binary that logs argv, ENV, and the contents of
GEMINI_CLI_SYSTEM_SETTINGS_PATH before exec-ing the real binary. Findings:
- --prompt on /new carries only
BARE_SESSION_RESET_PROMPT_BASE + Current time line - settings.json carries only MCP config (filesystem +
openclaw) — no persona - ENV only has tokens/paths — no persona
Reading dist/, prepare.runtime calls
resolveBootstrapContextForRun, builds a systemPrompt
with contextFiles, then
applySystemPromptOverrideToSession
(model-context-tokens-.js) mutates
session.agent.state.systemPrompt. That's the embedded
Pi Agent's session — not the spawned gemini child.
cli-backend-.js exposes only --prompt / --resume /
--output-format. So for embedded backends bootstrap
lands as systemInstruction, but on google-gemini-cli
there's no channel that carries it.
Occasional "correct" answers come from Telegram Sender
(untrusted metadata) in the prompt or from --resume
pulling residual content from older
~/.gemini/tmp/.../session-*.json — not from the
OpenClaw harness.
Question: Is there an official way (config / plugin /
extension hook) to get full harness behavior (bootstrap
injected as systemInstruction, with
cache-by-sessionKey, heartbeat, continuation-skip,
agent-scoped filtering) on google-gemini-cli? If
intentionally partial for spawn-based backends, is the
recommended workaround a workspace GEMINI.md with
@IDENTITY.md/@USER.md refs — or switching to a
direct-API Gemini backend? And is prepending bootstrap
to --prompt on this backend on the roadmap, or avoided
(token cost per turn)?