Skip to content

Feature: ephemeral / non-persisted sessions (align with Codex app-server ephemeral threads) #448

Description

@yitom486

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:

  1. Durable coding agent sessions 鈥?current ACP path (session/new + optional session/load / session/resume) is a great fit.
  2. 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 maybe session/resume/fork if applicable) to pass ephemeral: true (or equivalent).
  • When set: do not persist rollouts / durable session metadata; closing the session drops memory (optionally via session/close when advertised).

B. Adapter-only mapping (faster if protocol change is hard)

  • Document env/CLI flags for codex-acp that force Codex ephemeral / no-session-persist behavior for new sessions (or for the whole process).
  • Ideally still expose something queryable in initialize so 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 / resume for coding workflows.
  • Asking ACP to proxy raw app-server thread/* RPCs on the same connection.

References

  • Codex app-server: thread/start / thread/fork with ephemeral: 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions