Skip to content

Implement Codex CLI streaming and image attachments#57

Merged
slashdevcorpse merged 5 commits into
mainfrom
app/streaming-attachments
May 31, 2026
Merged

Implement Codex CLI streaming and image attachments#57
slashdevcorpse merged 5 commits into
mainfrom
app/streaming-attachments

Conversation

@slashdevcorpse
Copy link
Copy Markdown
Owner

@slashdevcorpse slashdevcorpse commented May 31, 2026

Summary

  • Streams Codex CLI assistant output into the chat UI as progressive server-sent events.
  • Passes supported image attachments to codex exec through temporary image files and validates attachment payloads at the API boundary.
  • Persists command execution tool-call and result events so CLI activity is visible in session history.
  • Adds parser coverage for cumulative assistant snapshots, token deltas, ignored non-assistant events, and final assistant output.

Validation

  • pnpm -C apps/codex-claw test
  • pnpm -C apps/codex-claw build
  • pnpm -C apps/landing build
  • pnpm pack:codex-claw
  • pnpm audit --audit-level low

Closes #11
Closes #12


Summary by cubic

Streams Codex CLI assistant responses into the chat UI via SSE and adds image attachment support by passing validated images to codex exec as temporary files. Also persists command execution tool-call and result events so CLI activity appears in session history (closes #11, #12).

  • New Features

    • Streams assistant deltas and final text; merges snapshots/token deltas and ignores non-assistant events.
    • Validates and normalizes image attachments (PNG/JPEG/GIF/WebP); rejects invalid base64 with clear 400 errors.
    • Writes images to temp files and passes them via --image to codex exec; cleans up after runs.
    • Persists command execution start/result as tool messages and emits them via SSE; adds tests for parsing and text merging.
  • Bug Fixes

    • Show tool call messages only when part.type is toolCall to fix ordering.
    • Include name in the attachment payload from the chat UI.

Written for commit 2dcb825. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings May 31, 2026 06:28
@slashdevcorpse slashdevcorpse merged commit 47135b1 into main May 31, 2026
2 of 3 checks passed
@slashdevcorpse slashdevcorpse deleted the app/streaming-attachments branch May 31, 2026 06:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

slashdevcorpse added a commit that referenced this pull request May 31, 2026
Implement Codex CLI streaming and image attachments
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.

Pass image attachments to Codex CLI Implement progressive Codex CLI streaming

2 participants