Repository navigation
Feature: ephemeral / non-persisted sessions (align with Codex app-server ephemeral threads) #448
Description
Summary
Please consider exposing an ephemeral / non-persisted session option over ACP, analogous to Codex app-server鈥檚 thread/start / thread/fork with ephemeral: true (in-memory only; no rollout path / not listed in durable thread history).
Today, ACP clients that use @agentclientprotocol/codex-acp can call session/new and keep a multi-turn context for the life of that session, but there is no first-class way to ask the Agent to skip writing session rollouts under CODEX_HOME (e.g. ~/.codex/sessions/). Client-side 鈥渄on鈥檛 persist UI history鈥?does not prevent Agent-side disk usage.
Motivation / use cases
ACP clients such as desktop editors (we build a Markdown editor + reader, Inkdown) want two modes:
- Durable coding agent sessions 鈥?current ACP path (
session/new+ optionalsession/load/session/resume) is a great fit. - Lightweight, disposable chats 鈥?e.g. selection translate, 鈥渉elp me draft this annotation鈥? short Q&A over a snippet. These should:
- remember context only for the active short chat
- not accumulate transcripts on disk after the UI closes
- avoid polluting the user鈥檚 Codex session list /
~/.codex/sessions
Codex app-server already documents this for its own protocol (ephemeral: true 鈫?in-memory thread, thread.path is null). Clients on ACP cannot call app-server methods on the same stdio pipe; bridging would mean a second transport. Aligning ACP/codex-acp with the existing ephemeral semantics would let editors stay on one Agent process model.
What we鈥檙e asking for
Any of the following would work; (A) is preferred if protocol evolution is acceptable:
A. Protocol + adapter (preferred)
- Advertise a capability, e.g.
sessionCapabilities.ephemeral(name TBD). - Allow
session/new(and maybesession/resume/forkif applicable) to passephemeral: true(or equivalent). - When set: do not persist rollouts / durable session metadata; closing the session drops memory (optionally via
session/closewhen advertised).
B. Adapter-only mapping (faster if protocol change is hard)
- Document env/CLI flags for
codex-acpthat force Codex ephemeral / no-session-persist behavior for new sessions (or for the whole process). - Ideally still expose something queryable in
initializeso Clients know whether 鈥渘o disk transcript鈥?is actually guaranteed.
C. Clarification
If the intentional design is 鈥淎CP always uses durable Codex sessions; use app-server for ephemeral鈥? please document that clearly so Client authors don鈥檛 assume session/new is disposable.
Non-goals
- Replacing durable
session/load/resumefor coding workflows. - Asking ACP to proxy raw app-server
thread/*RPCs on the same connection.
References
- Codex app-server:
thread/start/thread/forkwithephemeral: true(in-memory temporary thread; no durable path). - Codex CLI:
codex exec --ephemeral(skip writing session rollout files) 鈥?similar product intent for throwaway runs. - ACP session setup: https://agentclientprotocol.com/protocol/session-setup
Environment
- Client: Electron ACP Client (Inkdown)
- Agent:
@agentclientprotocol/codex-acp(default npm package)
Thanks for considering this 鈥?happy to refine the capability shape if you prefer a different name or placement under initialize / session/new.
Activity