Skip to content

fix(cua-driver): preserve named CLI sessions - #3144

Merged
f-trycua merged 2 commits into
mainfrom
agent/fix-cli-session-lifecycle
Aug 13, 2026
Merged

fix(cua-driver): preserve named CLI sessions#3144
f-trycua merged 2 commits into
mainfrom
agent/fix-cli-session-lifecycle

Conversation

@f-trycua

Copy link
Copy Markdown
Collaborator

Summary

  • keep explicit named sessions alive across independent one-shot CLI calls
  • retain disposable cleanup for calls without a public session label
  • add a process-level regression test for start, inspect, list, and end

Root cause

The one-shot CLI always minted a disposable transport owner and ended it immediately after every call. Named sessions were attached to that owner, so start_session succeeded and was then torn down before the next CLI process could inspect or reuse it.

User impact

Shell-oriented callers could not follow a named run across CLI calls even though the lifecycle contract supports repeated public session labels.

Fix

Explicit labels now use the daemon-scoped CLI ownership namespace and rely on explicit end_session or idle expiry. Anonymous calls keep their per-call owner and synchronous cleanup.

Checks

  • cargo fmt --all -- --check
  • cargo test -p cua-driver --test daemon_required_test --locked
  • cargo test -p cua-driver --bin cua-driver --locked
  • cargo clippy -p cua-driver --tests --locked

Refs #3007

@f-trycua
f-trycua force-pushed the agent/fix-cli-session-lifecycle branch 2 times, most recently from 85b2aba to 81122b8 Compare August 13, 2026 18:20
@f-trycua
f-trycua force-pushed the agent/fix-cli-session-lifecycle branch from 81122b8 to 503fd37 Compare August 13, 2026 18:40
@f-trycua
f-trycua marked this pull request as ready for review August 13, 2026 18:56
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@f-trycua
f-trycua merged commit 1803e52 into main Aug 13, 2026
24 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.

1 participant