-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat(cli): add multi-session management subcommands for Codex CLI #522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ames Signed-off-by: Kshitiz <kshitizyadav69@gmail.com>
Could you explain in details and give examples of the expected flow here? For example, it's not clear to me when one would use save as you would have to do that before you actually have interacted with codex? Additionally, seems that CI isn't passing, please check that and make sure it passes and I will have another look, thanks for the contribution! |
- Updated TerminalChatSession type to include 'cwd' and 'firstPrompt'. - Added non-null assertions in session-manager.test.ts to fix TS2532 errors. - Ensures type-checking passes for session management tests.
e6ef157
to
0dd840e
Compare
6b156f1
to
981a810
Compare
Clarification on the Multi-Session Expected FlowThe Here's a more refined breakdown of the intended flow with examples:
So, in summary, the |
that's very helpful, excelcially when error happens for example exceed quota limit and you need to write again initial promp |
Multi-Session Management for Codex CLI
Overview
This PR introduces enhanced session management functionality to the Codex CLI. Users can now save, list, load, and delete sessions using either autogenerated IDs or custom session names. The update extends the session-manager module (now supporting optional fields like
cwd
andfirstPrompt
), modifies the CLI parsing logic to handle newsession
subcommands, and includes additional unit tests.Changes
src/cli.tsx
to add newsession
subcommands:codex session save [name]
codex session list
codex session load <id/name>
codex session delete <id/name>
TerminalChatSession
type (insrc/utils/session.ts
) with optional fields (cwd
andfirstPrompt
)src/utils/session-manager.ts
to handle the new fields.tests/session-manager.test.ts
to cover session creation, loading, updating, and deletion.