fix: restore interrupted coding-cli sessions via durable identity#308
fix: restore interrupted coding-cli sessions via durable identity#308danshapiro wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88fecbd052
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| router.post('/tabs', async (req, res) => { | ||
| const { name, mode, shell, cwd, browser, editor, resumeSessionId, permissionMode, model, sandbox } = req.body || {} | ||
| const { name, mode, shell, cwd, browser, editor, sessionRef, permissionMode, model, sandbox } = req.body || {} |
There was a problem hiding this comment.
Restore legacy resume input for tab creation
The /api/tabs handler now only reads sessionRef, so resume requests sent as resumeSessionId are silently ignored and a fresh session is created instead of resuming. This regresses existing callers in the repo (for example server/cli/index.ts still posts { resumeSessionId } at line 316), so freshell new-tab --resume ... no longer resumes the requested session.
Useful? React with 👍 / 👎.
| try { | ||
| process.kill(pid, 'SIGTERM') | ||
| } catch (error) { |
There was a problem hiding this comment.
Avoid terminating live sidecars during orphan reaping
This reaper sends SIGTERM to every sidecar process described by metadata as long as the PID/identity matches, but it never verifies that the sidecar is actually orphaned. Because startup unconditionally calls CodexTerminalSidecar.reapOrphanedSidecars() (server/index.ts:291), starting a second Freshell instance can kill active Codex sidecars owned by another running instance, breaking those terminals.
Useful? React with 👍 / 👎.
Summary
thread.pathandfs/watchinstead of scanning~/.codex/sessionsTesting
npm testFRESHELL_REAL_PROVIDER_CONTRACTS=1 npm run test:vitest -- test/integration/real/coding-cli-session-contract.test.ts