#How can I inspect the generated system-prompt generated from system-prompt.ts?
1 messages · Page 1 of 1 (latest)
Yeah — that system prompt is assembled at run-time (workspace bootstrap files + skills snapshot + tool list/summaries + runtime info), then used as the system content for the model call.
You’ve got a couple good ways to see the final thing:
1) In-chat: export the session (includes the full system prompt)
In the same chat/thread, run:
/export-session(or/export)
It will write an HTML file into the agent workspace that includes:
- the full generated
systemPromptstring - the tool list + tool JSON schemas
- the session transcript
Open that HTML on the gateway host (or wherever your workspace lives).
2) Log the actual outbound request payload (best for “what was sent”)
Option A: Cache trace (works across providers)
Enable cache tracing in ~/.openclaw/openclaw.json:
{
diagnostics: {
cacheTrace: {
enabled: true,
includeSystem: true,
includeMessages: true
}
}
}
Then check:
$OPENCLAW_STATE_DIR/logs/cache-trace.jsonl(default:~/.openclaw/logs/cache-trace.jsonl)