Skip to content

feat: support ephemeral ACP sessions - #391

Open
hokupod wants to merge 2 commits into
agentclientprotocol:mainfrom
hokupod:hokupod/codex-acp-ephemeral-sessions
Open

hokupod wants to merge 2 commits into
agentclientprotocol:mainfrom
hokupod:hokupod/codex-acp-ephemeral-sessions

Conversation

@hokupod

@hokupod hokupod commented Aug 12, 2026

Copy link
Copy Markdown

Summary

Allow automation clients to create one-off ACP sessions backed by in-memory Codex threads. On session/new, _meta.codex.ephemeral: true is forwarded to thread/start as ephemeral: true.

Kyoso runs Codex reviewers through ACP and does not resume those review sessions. This opt-in lets such clients avoid retaining one-off reviews as persisted Codex tasks. The adapter needs to forward the storage choice when it creates the Codex thread; filtering the client's session list alone would not change thread persistence.

Compatibility

  • Missing metadata or ephemeral: false preserves the existing persisted-session behavior.
  • Non-boolean ephemeral values are rejected with ACP invalidParams before thread creation.
  • Unrelated keys under _meta.codex remain ignored.
  • The opt-in is documented in README. Ephemeral sessions are not intended to be listed or resumed.
  • The feature uses the existing generated ThreadStartParams.ephemeral field and requires no schema changes.

Validation

Validated with upstream main at effb0fe670a49dfbb5071764b5f8a2e3c09e2393 incorporated into head c9e698e86b0f88566ba31fcfe3688f2b5c5d5366:

  • npm run typecheck — passed.
  • npm test — 614 passed, 26 skipped, including opt-in, default/false compatibility, and invalid-value coverage.
  • npm run build — passed.
  • npm run bundle:all with CI's Bun 1.3.11 — all six targets passed.
  • git diff --check effb0fe670a49dfbb5071764b5f8a2e3c09e2393 HEAD — passed.
  • Real Codex smoke test using a temporary adaptation of the repository's run-codex runner with ephemeral metadata — thread/started reported thread.path = null, and the prompt completed with end_turn. This was a focused smoke test; the full live-provider E2E suite was not run.

GitHub CI and Conventional PRs currently report action_required with zero jobs; hosted checks have not run on this head.

@hokupod
hokupod marked this pull request as ready for review August 12, 2026 10:05
@hokupod

hokupod commented Sep 14, 2026

Copy link
Copy Markdown
Author

@nikita-ashihmin I've resolved the conflicts with main and updated the validation results at head c9e698e. Local checks pass: 614 tests passed, 26 skipped, plus typecheck, build, and all six binary targets. A real Codex smoke test confirmed thread.path = null and normal prompt completion.

The CI and Conventional PRs runs show action_required with zero jobs. Could you approve the fork workflows when you have a chance?

Could you also confirm whether _meta.codex.ephemeral on session/new is an acceptable API shape? This lets one-off ACP review sessions use Codex's existing in-memory thread option while preserving default behavior. I'm happy to adjust the metadata namespace or capability advertisement to the project's preferred convention.

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