Heartbeat guidance added to GPT-5 overlay

The GPT-5 overlay now instructs the AI how to handle system heartbeat polls—be proactive, use tools, maintain variety, and decide when to notify users or stay quiet.
Previously, the GPT-5 overlay lacked guidance for handling system-generated heartbeat polls. When these interval-based signals arrived, the AI had no framework for responding beyond treating them as regular messages.
The new heartbeat section changes this. It explains that heartbeats are sent by OpenClaw on a timer, not by the user, and that their purpose is to make the AI feel "magical and proactive." The guidance directs the AI to use its tools, think big picture, maintain variety in its responses, and follow instructions in HEARTBEAT.md when present.
Crucially, the overlay teaches the AI judgment: when something warrants user attention, speak up; otherwise, reply HEARTBEAT_OK and stay quiet. This balance lets the AI shift from a simple reply bot to an agent that creates proactive value between user interactions.
The change sits in the OpenAI extension's prompt overlay, which shapes how GPT-5 interprets incoming messages and decides what to do.
View Original GitHub Description
Summary
- add heartbeat-specific proactive guidance to the GPT-5 friendly OpenAI overlay
- keep the wording close to the proven Codex internal heartbeat prompt while adapting it to OpenClaw heartbeat polls and HEARTBEAT.md
- add regression coverage for the new overlay language
Testing
- pnpm test extensions/openai/index.test.ts
- pnpm check