Phase 2: Polish — remediation hints, active-session history awareness#2
Phase 2: Polish — remediation hints, active-session history awareness#2
Conversation
…history Addresses openclaw#157 and openclaw#176: - sessions history now probes the queue owner when no messages are found. If the session is actively being served, it shows a hint instead of the bare "No history" message. JSON output includes an `active` flag. - All normalized errors now include a `hint` field with actionable remediation guidance based on error code, detail code, and ACP payload. Hints are shown in text mode on stderr and included in JSON-RPC error data for machine consumers. Co-Authored-By: claude-flow <ruv@ruv.net>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1c3f335c01
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| detailCode: params.detailCode, | ||
| origin: params.origin, | ||
| retryable: params.retryable, | ||
| hint: params.hint, | ||
| timestamp: params.timestamp, |
There was a problem hiding this comment.
Include hint when forwarding ACP error payloads
In JSON mode, hints are only injected into the fallback ACPX metadata path, but buildErrorObject() returns the raw ACP error whenever acp is present, so data.hint is dropped for the most common adapter-originated failures (including the ACP-code-based hints added in this change). That means machine consumers still cannot read remediation hints for ACP-backed errors.
Useful? React with 👍 / 👎.
Summary
sessions historynow detects when a session has an active queue owner and shows a helpful message instead of bare "No history". JSON output includes anactive: trueflag when applicable.hintfields with remediation guidance based on error code, detail code, and ACP payload. Hints appear in text mode on stderr and in JSON-RPC errordata.hintfor machine consumers. Covers: TIMEOUT, NO_SESSION, PERMISSION_DENIED, AUTH_REQUIRED, AGENT_SPAWN_FAILED, and common ACP error codes.Test plan
remediationHint()covering all known error codes and detail codesnormalizeOutputErrorincludeshintin output for AuthPolicyErrornpm run typecheckpassesnpm run buildpasses🤖 Generated with claude-flow