Skip to content

fix(codex): parse jsonl frames linearly - #162

Merged
tarik02 merged 2 commits into
mainfrom
fix/linear-codex-jsonl-framing
Aug 27, 2026
Merged

fix(codex): parse jsonl frames linearly#162
tarik02 merged 2 commits into
mainfrom
fix/linear-codex-jsonl-framing

Conversation

@tarik02

@tarik02 tarik02 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

What Changed

Parse Codex app-server JSONL input by scanning each incoming chunk once and joining pending fragments only when a complete line arrives.

Why

Large thread/resume responses previously rebuilt and rescanned the entire pending line for every chunk, making framing quadratic and causing long disconnect-like stalls.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • UI changes are not applicable
  • Animation and interaction changes are not applicable

Model: GPT-5
Harness: T3 Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M labels Aug 27, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 099cdaed54

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

Comment thread packages/effect-codex-app-server/src/protocol.ts
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 12.1 KiB 12.1 KiB −3 B (−0.0%) 15.1 KiB
Codex Thread snapshot wire 5.8 KiB 5.8 KiB +2 B (+0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −5 B (−0.1%) 7.8 KiB
Codex Live turn WebSocket decoded 55.5 KiB 55.5 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 9 9 0 (0.0%) 21
Claude Total thread wire 12.2 KiB 12.2 KiB −9 B (−0.1%) 15.1 KiB
Claude Thread snapshot wire 5.8 KiB 5.8 KiB −3 B (−0.1%) 7.3 KiB
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB −6 B (−0.1%) 7.8 KiB
Claude Live turn WebSocket decoded 56.4 KiB 56.4 KiB 0 B (0.0%) 66.4 KiB
Claude Live turn messages 9 9 0 (0.0%) 21

Baseline: 956252e · PR result: bb4026d · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 84.1 KiB
  • Claude decoded thread snapshot: 84.5 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@tarik02

tarik02 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator Author

@codex recheck

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: bb4026d851

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

@tarik02
tarik02 merged commit 7c697ee into main Aug 27, 2026
26 checks passed
@tarik02
tarik02 deleted the fix/linear-codex-jsonl-framing branch August 28, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant