Skip to content

Support clear SessionStart source#17073

Merged
abhinav-oai merged 1 commit intomainfrom
codex/session-start-clear
Apr 10, 2026
Merged

Support clear SessionStart source#17073
abhinav-oai merged 1 commit intomainfrom
codex/session-start-clear

Conversation

@abhinav-oai
Copy link
Copy Markdown
Contributor

Motivation

The SessionStart hook already receives startup and resume sources, but sessions created from /clear previously looked like normal startup sessions. This makes it impossible for hook authors to distinguish between these with the matcher.

Summary

  • Add InitialHistory::Cleared so /clear-created sessions can be distinguished from ordinary startup sessions.
  • Add SessionStartSource::Clear and wire it through core, app-server thread start params, and TUI clear-session flow.
  • Update app-server protocol schemas, generated TypeScript, docs, and related tests.
clear.demo.mov

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@abhinav-oai
Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@abhinav-oai
Copy link
Copy Markdown
Contributor Author

recheck

github-actions bot added a commit that referenced this pull request Apr 8, 2026
@abhinav-oai abhinav-oai marked this pull request as ready for review April 8, 2026 03:13
@abhinav-oai abhinav-oai force-pushed the codex/session-start-clear branch 2 times, most recently from a183ca6 to 48659e2 Compare April 8, 2026 06:45
@abhinav-oai
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 👍

ℹ️ 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".

@abhinav-oai abhinav-oai merged commit 7999b0f into main Apr 10, 2026
43 of 45 checks passed
@abhinav-oai abhinav-oai deleted the codex/session-start-clear branch April 10, 2026 23:05
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants