Skip to content

fix: skip load for pristine sessions#172

Open
lynnzc wants to merge 2 commits intoopenclaw:mainfrom
lynnzc:fix/issue-165-pristine-session-load
Open

fix: skip load for pristine sessions#172
lynnzc wants to merge 2 commits intoopenclaw:mainfrom
lynnzc:fix/issue-165-pristine-session-load

Conversation

@lynnzc
Copy link
Contributor

@lynnzc lynnzc commented Mar 23, 2026

Summary

  • skip session/load for pristine saved sessions that have no turns yet and only need a fresh ACP session
  • keep existing resume behavior for sessions with history, explicit mode state, or config replay needs
  • add a regression test covering the pristine-session fast path

Why

Issue #165 reports a large delay before the first streamed text event on codex prompt --session compared with codex exec.

For freshly ensured sessions with no prior turns, acpx was still attempting session/load before the first prompt. On Codex, that extra resume path appears to be the wrong fit for a pristine session and can delay the first streamed output. This change sends those pristine sessions straight to session/new instead.

Fixes #165.

Validation

  • pnpm run build
  • pnpm run build:test
  • node --test dist-test/test/connect-load.test.js
  • node --test dist-test/test/prompt-runner.test.js

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.

codex prompt --session delays first text event by ~190s on a prompt where codex exec completes in ~208s

1 participant