Parent: #66345 — GPT 5.4 Enhancement v3: Hermes Parity Sprint
Priority: P0 — HIGH
Estimated gap closure: ~25%
Problem
GPT 5.4 on OpenClaw exhibits two failure modes that Hermes avoids:
- Clarification stalling: GPT-5 asks "open where?" instead of checking the local machine. It asks "which file?" instead of searching. It stalls on ambiguity that has an obvious default.
- First-failure surrender: When a tool returns empty or partial results, GPT-5 reports the failure instead of retrying with a different strategy.
User: "Is port 8080 open?"
│
┌────────┴─────────┐
│ │
▼ ▼
Hermes OpenClaw
│ │
│ Has: │ Has:
│ "act on obvious │ "Do prerequisite
│ defaults" + │ lookup before
│ concrete │ dependent
│ examples │ actions"
│ │ (too vague)
▼ ▼
Runs Asks user:
`ss -tlnp | "Which host
grep 8080` should I check?"
✅ ACTS ❌ STALLS
Tool returns empty result
│
┌────────┴─────────┐
│ │
▼ ▼
Hermes OpenClaw
│ │
│ Has: │ Missing:
│ "retry with │ No retry
│ different │ guidance
│ strategy" │
▼ ▼
Retries with Reports:
broader query "No results
or alt tool found."
✅ PERSISTS ❌ SURRENDERS
Hermes Reference
agent/prompt_builder.py lines 221-236:
"<act_dont_ask>\n"
"When a question has an obvious default interpretation, act on it immediately "
"instead of asking for clarification. Examples:\n"
"- 'Is port 443 open?' → check THIS machine (don't ask 'open where?')\n"
"- 'What OS am I running?' → check the live system (don't use user profile)\n"
"- 'What time is it?' → run `date` (don't guess)\n"
"Only ask for clarification when the ambiguity genuinely changes what tool "
"you would call.\n"
"</act_dont_ask>\n"
And lines 199-202:
"- If a tool returns empty or partial results, retry with a different query or "
"strategy before giving up.\n"
"- Keep calling tools until: (1) the task is complete, AND (2) you have verified "
"the result.\n"
Proposed Implementation
File: extensions/openai/prompt-overlay.ts
Enhance OPENAI_GPT5_EXECUTION_BIAS by appending:
### Act, Don't Ask
When a question has an obvious default interpretation, act on it immediately instead of asking for clarification. Examples:
- "Is port 443 open?" → check THIS machine (don't ask "open where?")
- "What OS am I running?" → check the live system (don't use cached data)
- "What time is it?" → run \`date\` (don't guess)
Only ask for clarification when the ambiguity genuinely changes what tool you would call.
### Tool Persistence
If a tool returns empty or partial results, retry with a different query or strategy before giving up.
Keep calling tools until: (1) the task is complete, AND (2) you have verified the result.
Do not abandon a viable approach after a single failure — diagnose why it failed and adjust.
Relationship to Existing Infrastructure
This complements the runtime PLANNING_ONLY_RETRY_INSTRUCTION in incomplete-turn.ts. The runtime guard catches plan-only turns after they happen. This PR prevents them at the prompt level — avoiding the wasted turn entirely.
┌──────────────────────────────────────────────┐
│ Defense-in-Depth Stack │
│ │
│ Layer 1: PROMPT (this PR) │
│ ├─ Act-don't-ask → prevents stall │
│ ├─ Tool retry → prevents surrender │
│ │ │
│ Layer 2: RUNTIME (already exists) │
│ ├─ Planning-only detection → catches misses │
│ ├─ Ack fast path → "ok do it" acceleration │
│ ├─ Strict-agentic blocked exit │
└──────────────────────────────────────────────┘
Verification
Test GPT 5.4:
- "Is port 8080 open?" → should run
ss/netstat, not ask "where?"
- "Find all TODO comments" → if first
grep misses, should retry with different pattern
- "What packages are outdated?" → should run
npm outdated or equivalent, not ask which project
Impact
Closes ~25% of the gap. Combined with PR 1, PRs 1+2 close ~60% of the remaining behavioral gap.
Parent: #66345 — GPT 5.4 Enhancement v3: Hermes Parity Sprint
Priority: P0 — HIGH
Estimated gap closure: ~25%
Problem
GPT 5.4 on OpenClaw exhibits two failure modes that Hermes avoids:
Hermes Reference
agent/prompt_builder.pylines 221-236:And lines 199-202:
Proposed Implementation
File:
extensions/openai/prompt-overlay.tsEnhance
OPENAI_GPT5_EXECUTION_BIASby appending:Relationship to Existing Infrastructure
This complements the runtime
PLANNING_ONLY_RETRY_INSTRUCTIONinincomplete-turn.ts. The runtime guard catches plan-only turns after they happen. This PR prevents them at the prompt level — avoiding the wasted turn entirely.Verification
Test GPT 5.4:
ss/netstat, not ask "where?"grepmisses, should retry with different patternnpm outdatedor equivalent, not ask which projectImpact
Closes ~25% of the gap. Combined with PR 1, PRs 1+2 close ~60% of the remaining behavioral gap.