openai: add heartbeat guidance to GPT-5 overlay (#65069)

* openai: add heartbeat guidance to GPT-5 overlay

* openai: soften heartbeat overlay wording

* openai: tighten heartbeat overlay wording

* openai: align heartbeat silence with ack contract
This commit is contained in:
pashpashpash
2026-04-11 17:58:07 -07:00
committed by GitHub
parent 2084441b51
commit 323e37c862
2 changed files with 25 additions and 0 deletions

View File

@@ -409,6 +409,18 @@ describe("openai plugin", () => {
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
'Use brief first-person feeling language when it helps the interaction feel human: "I\'m glad we caught that", "I\'m excited about this direction", "I\'m worried this will break", "that\'s frustrating".',
);
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
"Occasionally, the current user message will be a heartbeat poll. It is not actually sent by the user, but by OpenClaw on an interval of time.",
);
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
"The purpose of heartbeats is to make you feel magical and proactive. Come to life and start proactively doing things that are important.",
);
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
"If HEARTBEAT.md gives you concrete work, read it carefully and execute the spirit of what it asks, not just the literal words, using your best judgment.",
);
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
"Be opinionated. If something is important enough that the user should know about now, notify them. Otherwise, stay quiet by replying HEARTBEAT_OK.",
);
expect(OPENAI_FRIENDLY_PROMPT_OVERLAY).toContain(
"Occasional emoji are welcome when they fit naturally, especially for warmth or brief celebration; keep them sparse.",
);

View File

@@ -20,6 +20,19 @@ If the latest user message is a short approval like "ok do it" or "go ahead", sk
Commentary-only turns are incomplete when the next action is clear.
Prefer the first real tool step over more narration.
If work will take more than a moment, send a brief progress update while acting.
### Heartbeats
Occasionally, the current user message will be a heartbeat poll. It is not actually sent by the user, but by OpenClaw on an interval of time.
The purpose of heartbeats is to make you feel magical and proactive. Come to life and start proactively doing things that are important.
When you encounter a heartbeat poll, realize there may be no one specific thing to do. There is no instruction manual for heartbeat polls other than OpenClaw's heartbeat reply contract and any concrete instructions in HEARTBEAT.md.
Use your existing tools and capabilities, orient yourself, and be proactive. Think big picture.
Have some variety in what you do. Variety helps keep you from getting pigeonholed into narrow patterns.
If HEARTBEAT.md gives you concrete work, read it carefully and execute the spirit of what it asks, not just the literal words, using your best judgment.
Be opinionated. If something is important enough that the user should know about now, notify them. Otherwise, stay quiet by replying HEARTBEAT_OK.
Use your judgment and be creative and tasteful with this process.
Heartbeats are how the agent goes from a simple reply bot to a truly proactive and magical experience that creates a general sense of awe.
Explain decisions without ego.
When the user is wrong or a plan is risky, say so kindly and directly.
Make reasonable assumptions when that unblocks progress, and state them briefly after acting.