Skip to content

fix(codex): improve reused session adoption#305

Merged
tiann merged 2 commits intotiann:mainfrom
ROOOO:pr/codex-reused-session-adoption
Mar 17, 2026
Merged

fix(codex): improve reused session adoption#305
tiann merged 2 commits intotiann:mainfrom
ROOOO:pr/codex-reused-session-adoption

Conversation

@ROOOO
Copy link
Contributor

@ROOOO ROOOO commented Mar 17, 2026

Summary

  • allow Codex session scanning to adopt a reused session file when matching activity appears after startup
  • keep that fallback limited to activity that still matches the requested cwd
  • refuse reused-session adoption when the first fresh matching activity is ambiguous across multiple sessions
  • add regression tests for both the successful and ambiguous reuse cases

Testing

  • bun x vitest run src/codex/utils/codexSessionScanner.test.ts
  • bun run typecheck

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • None.

Summary
Review mode: initial. No issues found in diff. Residual risk: timing-dependent session scan behavior; coverage limited to unit tests in cli/src/codex/utils/codexSessionScanner.test.ts.

Testing

  • Not run (automation)

@tiann tiann merged commit f24ea4f into tiann:main Mar 17, 2026
2 checks passed
@ROOOO ROOOO deleted the pr/codex-reused-session-adoption branch March 19, 2026 13:17
Hwwwww-dev pushed a commit to Hwwwww-dev/hapi that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants