You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI (headless/exec): synchronously generate memories for a specific session #29430
CLIIssues related to the Codex CLIenhancementNew feature or requestexecIssues related to the `codex exec` subcommandmemorysessionIssues involving session (thread) management, resuming, forking, naming, archiving
This is not a request for arbitrary memory writes. It is a request for a CLI/headless surface over the existing memory-generation pipeline,
targeted at one known session.
What problem is this solving?
Today I can make sessions memory-eligible, but in headless/exec workflows I cannot tell Codex: "generate memories from this exact session now,
and do not return until they are written."
For automation, background or deferred generation is not sufficient. I need a deterministic completion point where the session has been processed
and the memory files are already on disk. For example, after a headless run I may want to archive or copy the full Codex state/config area and know
that the generated memories are included.
What would make this usable?
At minimum:
accept a session ID, plus --last
work in headless / codex exec workflows
execute extraction immediately, not just enqueue it
return only after memory files are written locally
exit non-zero on failure
report generated or skipped
include skip reasons such as session still active, memories disabled, external context excluded, rate limit, or already processed
I think this is related to #29318, but not a duplicate.
#29318 is asking for a broader centralized memory consolidation flow, including collecting session data from many temporary/headless machines and consolidating/distributing memory centrally.
This issue is narrower: a CLI/headless way to target one specific saved session (or --last) and block until that session's memories have been written locally.
So the key requirement here is session-scoped synchronous local completion semantics, not a centralized memory service.
Following up: we now use Codex exclusively through "app-server", so only an app-server API is relevant to our use case.
We run Codex with a dedicated settings/state directory. After a session finishes, we want to explicitly generate its native memories and wait until extraction, consolidation, and local file writes are complete before copying the memory artifacts into our project repository.
A job ID followed by a completion notification would work. The proposed "MemoryGenerationReceipt" could identify the processed session and last included turn, and distinguish success, skipping, and failure with appropriate reasons.
Could this request also cover an app-server endpoint with these completion semantics?
CLIIssues related to the Codex CLIenhancementNew feature or requestexecIssues related to the `codex exec` subcommandmemorysessionIssues involving session (thread) management, resuming, forking, naming, archiving
Activity
github-actions commentedon Jun 22, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
mstrap commentedon Jun 22, 2026
I think this is related to #29318, but not a duplicate.
#29318 is asking for a broader centralized memory consolidation flow, including collecting session data from many temporary/headless machines and consolidating/distributing memory centrally.
This issue is narrower: a CLI/headless way to target one specific saved session (or
--last) and block until that session's memories have been written locally.So the key requirement here is session-scoped synchronous local completion semantics, not a centralized memory service.
safal207 commentedon Jun 22, 2026
This looks like a useful primitive not only for headless automation, but also for reliable cross-session memory workflows.
One possible addition would be a structured, session-scoped
MemoryGenerationReceiptinstead of relying only on human-readable stdout:session_idgenerated | skipped | failedreason_codeThis would provide:
--waitSuggested acceptance cases:
I would be happy to help refine the data model and test matrix, and contribute an implementation if the maintainers invite a PR.
mstrap commentedon Nov 10, 2026
Following up: we now use Codex exclusively through "app-server", so only an app-server API is relevant to our use case.
We run Codex with a dedicated settings/state directory. After a session finishes, we want to explicitly generate its native memories and wait until extraction, consolidation, and local file writes are complete before copying the memory artifacts into our project repository.
A job ID followed by a completion notification would work. The proposed "MemoryGenerationReceipt" could identify the processed session and last included turn, and distinguish success, skipping, and failure with appropriate reasons.
Could this request also cover an app-server endpoint with these completion semantics?