#OPENCLAW REPORT AGENT — CRON USING OLD OUTPUT FORMAT

3 messages · Page 1 of 1 (latest)

cosmic sluice
#

Version:
OpenClaw 2026.4.12

OBJECTIVE:

Ensure report agent outputs strict compact format (bullet points only, no sections, ≤ ~16 lines).

PROBLEM:

Manual execution → CORRECT (compact bullet format)
Cron execution → WRONG (old multi-section format with long explanations)

EXAMPLE (WRONG OUTPUT):

• Multiple sections (e.g. summaries, structure, etc.)
• Long paragraphs
• Narrative-style explanations

→ This format is NOT defined in current AGENTS.md

VERIFIED:

• /root/.openclaw/agents/market-brief/agent/AGENTS.md = compact format
• /root/.openclaw/workspace-market-brief/AGENTS.md = IDENTICAL
• Gateway restarted after sync

Manual command:

openclaw agent –agent market-brief –message “Generate report”

→ Outputs correct compact format

CRON COMMAND:

openclaw agent –agent market-brief –message “Generate daily report” –local

ISSUE:

Cron still produces old structured format

→ Indicates another prompt source, cache, or template override

QUESTIONS:
1. Does --local load a different prompt context or cached state?
2. Can output format be cached across sessions (cron vs manual)?
3. Are there hidden templates overriding AGENTS.md (e.g. MARKET_BRIEF.md, SOUL.md)?
4. How to force AGENTS.md as single source of truth?
5. How to disable any legacy formatting layers?

GOAL:

Cron output must match manual output exactly:

• Bullet points only
• No sections
• No narrative
• ≤ ~16 lines

EXPECTED:

Deterministic, identical output across all execution paths
:::

hard duneBOT
#

Let me pin down the --local path and the env/session bits so I don’t guess.

#

• You’re comparing two different execution paths, not just manual vs cron: no --local = Gateway path, --local = embedded local path. agentCliCommand() sends non-local to agentViaGatewayCommand(), but --local jumps straight to agentCommand(). Restarting the Gateway does nothing for --local.
--local does not load a special “cron template”, but it reads config/state from the local process env. If cron has different HOME, OPENCLAW_PROFILE, OPENCLAW_STATE_DIR, or OPENCLAW_CONFIG_PATH, it can hit a different workspace, config, and session store than the manual run.
--agent market-brief resolves to the persistent main session key agent:market-brief:main, so yes, old behavior can persist across runs.
• The “cache” here is session history + post-compaction reinjection, not a separate output-format cache.
• Hidden prompt sources are real: normal runs inject AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, BOOTSTRAP.md (first-run), and MEMORY.md/memory.md, plus bootstrap-extra-files if enabled. There is no built-in MARKET_BRIEF.md lookup.
• Legacy formatting can re-enter after compaction: default postCompactionSections is ["Session Startup","Red Lines"], and when unset/default OpenClaw also accepts legacy ["Every Session","Safety"].
• Easiest deterministic fix: make cron use the same path as manual, so drop --local and call the Gateway command instead.
• If you must keep --local, use a fresh session each run (--session-id <daily-id>), and make cron export the same env/profile as your manual shell.
• To disable the legacy reinjection layer, set agents.defaults.compaction.postCompactionSections: [].
• There is no normal-run “AGENTS.md only” switch in 2026.4.12; if you want AGENTS to be the single formatting authority, keep format rules only there and remove/confine style rules from SOUL.md / USER.md / extra bootstrap files.
• Docs: https://docs.openclaw.ai/cli/agent