Skip to content

Add Codex compatibility with runtime-agnostic agent/session handling#10

Open
mexicorea wants to merge 1 commit intopablodelucca:mainfrom
mexicorea:feature/add-codex-compat
Open

Add Codex compatibility with runtime-agnostic agent/session handling#10
mexicorea wants to merge 1 commit intopablodelucca:mainfrom
mexicorea:feature/add-codex-compat

Conversation

@mexicorea
Copy link

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:

    • terminal launch command
    • session root resolution
    • terminal naming
  • Made agent lifecycle/runtime state explicit (runtime, pending session linking).

  • Added Codex session discovery/linking from ~/.codex/sessions/**/*.jsonl using session_meta.payload.cwd.

  • Added Codex transcript parsing:

    • function_call -> tool start
    • function_call_output -> tool done
    • final_answer / task_complete -> waiting
  • Isolated Codex-specific logic into:

    • src/codex/session.ts
    • src/codex/transcript.ts
  • Added shared JSONL file utility:

    • src/sessionFiles.ts
  • Added Settings support for default runtime (Claude/Codex) + persistence.

    • image
  • Updated CLAUDE.md to 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

  • Manual smoke test in Extension Development Host:
    • + Agent works for both Claude and Codex
    • tool/waiting status updates are emitted correctly
    • runtime setting persists and affects new launches

@mexicorea mexicorea force-pushed the feature/add-codex-compat branch from 29ddf61 to 46071db Compare March 5, 2026 07:25
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.

1 participant