Repository navigation
Conversation
Greptile SummaryThis PR fixes Confidence Score: 5/5Safe to merge — one-line logic fix with well-scoped tests; only finding is a duplicate test case. The only finding is a P2 duplicate test; all logic is correct and the implementation matches the described intent. No files require special attention.
|
8e193e3 to
d38eb62
Compare
…aw#65760) When a model call fails and OpenClaw triggers a fallback retry, resolveFallbackRetryPrompt() replaced the entire original user body with the fixed string "Continue where you left off. The previous model attempt failed or timed out." This discarded the original task instruction entirely, forcing the fallback model to reconstruct the task from history alone — sometimes impossible, sometimes just wrong. Prepend the retry context to the original body instead so the fallback model has both the recovery signal and the task instruction: [Retry after the previous model attempt failed or timed out] <original body> The existing subagent-spawn branch (no persisted session history) is unaffected — that path still returns params.body verbatim. Update the matching test to assert the new prefixed form. Closes openclaw#65760
d38eb62 to
ba919d1
Compare
|
Merged via squash.
Thanks @WuKongAI-CMU! |
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
…aw#65760) (openclaw#66029) Merged via squash. Prepared head SHA: ba919d1 Co-authored-by: WuKongAI-CMU <[email protected]> Co-authored-by: altaywtf <[email protected]> Reviewed-by: @altaywtf
Summary
When a model call fails and OpenClaw triggers a fallback retry, `resolveFallbackRetryPrompt()` replaced the entire original user body with the fixed string `"Continue where you left off. The previous model attempt failed or timed out."` This discarded the original task instruction entirely, forcing the fallback model to reconstruct the task from session history alone — sometimes impossible (e.g. freshly spawned subagent where only the last message survives), sometimes just wrong.
Prepend the retry context to the original body instead so the fallback model has both the recovery signal AND the task:
```
\`\`\`[Retry after the previous model attempt failed or timed out]
The existing subagent-spawn branch (no persisted session history) is unaffected — that path still returns `params.body` verbatim.
Credit to #65760 for a clean root-cause trace (incl. pointer to `attempt-execution.helpers.ts:resolveFallbackRetryPrompt`).
Closes #65760.
Changes
Test plan
🤖 Generated with Claude Code