Skip to content

fix: suppress recoverable session/load fallback errors#122

Merged
vincentkoc merged 5 commits intoopenclaw:mainfrom
lynnzc:fix/recoverable-load-fallback-output
Mar 12, 2026
Merged

fix: suppress recoverable session/load fallback errors#122
vincentkoc merged 5 commits intoopenclaw:mainfrom
lynnzc:fix/recoverable-load-fallback-output

Conversation

@lynnzc
Copy link
Contributor

@lynnzc lynnzc commented Mar 12, 2026

Summary

  • buffer ACP output emitted during connectAndLoadSession and defer rendering until the connect step completes
  • when session/load fails with a recoverable error and acpx falls back to session/new, strip the failed session/load request/response pair from rendered output
  • keep the fallback behavior unchanged (loadError is still recorded and the record still rotates to the fresh ACP session id)
  • update integration coverage to assert that recoverable load fallback no longer emits user-facing error payloads
  • add a dedicated integration test for the Resource not found fallback path

Why

acpx ... prompt can recover from initial session/load failures by creating a fresh session, but the first run currently surfaces the recoverable load error in user output. That makes newly created sessions look broken even though the prompt succeeds. This change keeps recovery semantics while reducing misleading first-run failures.

References #121.

Test Plan

  • pnpm run format:check && pnpm run typecheck && pnpm run lint
  • pnpm run build:test && node --test dist-test/test/integration.test.js --test-name-pattern='prompt recovers when loadSession'
  • pnpm run build:test && npx -y node@22 --experimental-test-coverage --test-coverage-lines=83 --test-coverage-branches=76 --test-coverage-functions=86 --test dist-test/test/*.test.js

lynnzc and others added 5 commits March 12, 2026 15:00
Bumps the development group with 1 update: [tsdown](https://github.com/rolldown/tsdown).


Updates `tsdown` from 0.21.0 to 0.21.1
- [Release notes](https://github.com/rolldown/tsdown/releases)
- [Commits](rolldown/tsdown@v0.21.0...v0.21.1)

---
updated-dependencies:
- dependency-name: tsdown
  dependency-version: 0.21.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Bumps the development group with 4 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [lint-staged](https://github.com/lint-staged/lint-staged), [oxfmt](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxfmt) and [oxlint](https://github.com/oxc-project/oxc/tree/HEAD/npm/oxlint).


Updates `@types/node` from 25.3.5 to 25.4.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `lint-staged` from 16.3.2 to 16.3.3
- [Release notes](https://github.com/lint-staged/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md)
- [Commits](lint-staged/lint-staged@v16.3.2...v16.3.3)

Updates `oxfmt` from 0.36.0 to 0.37.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxfmt/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxfmt_v0.37.0/npm/oxfmt)

Updates `oxlint` from 1.51.0 to 1.52.0
- [Release notes](https://github.com/oxc-project/oxc/releases)
- [Changelog](https://github.com/oxc-project/oxc/blob/main/npm/oxlint/CHANGELOG.md)
- [Commits](https://github.com/oxc-project/oxc/commits/oxlint_v1.52.0/npm/oxlint)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 25.4.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development
- dependency-name: lint-staged
  dependency-version: 16.3.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: development
- dependency-name: oxfmt
  dependency-version: 0.37.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development
- dependency-name: oxlint
  dependency-version: 1.52.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@vincentkoc vincentkoc merged commit 2d7dc9e into openclaw:main Mar 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants