Add Codex compatibility with runtime-agnostic agent/session handling#10
Open
mexicorea wants to merge 1 commit intopablodelucca:mainfrom
Open
Add Codex compatibility with runtime-agnostic agent/session handling#10mexicorea wants to merge 1 commit intopablodelucca:mainfrom
mexicorea wants to merge 1 commit intopablodelucca:mainfrom
Conversation
29ddf61 to
46071db
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds first-pass Codex compatibility and refactors agent/session handling to be runtime-agnostic (Claude + Codex), while keeping existing Claude behavior intact.
What Changed
Added runtime abstraction (
claude | codex) for:Made agent lifecycle/runtime state explicit (
runtime, pending session linking).Added Codex session discovery/linking from
~/.codex/sessions/**/*.jsonlusingsession_meta.payload.cwd.Added Codex transcript parsing:
function_call-> tool startfunction_call_output-> tool donefinal_answer/task_complete-> waitingIsolated Codex-specific logic into:
src/codex/session.tssrc/codex/transcript.tsAdded shared JSONL file utility:
src/sessionFiles.tsAdded Settings support for default runtime (Claude/Codex) + persistence.
Updated
CLAUDE.mdto reflect the new architecture and message flow.Why
Claude and Codex have fundamentally different session/transcript behaviors. This change introduces a clean runtime split so both can be supported safely without embedding Codex-specific logic across the core flow.
Validation
+ Agentworks for both Claude and Codex