Skip to content

fix(codex): keep native transcript when removing a cyber block - #870

Merged
Juliusolsson05 merged 3 commits into
mainfrom
fix/codex-cyber-block-native-clone
Sep 11, 2026
Merged

Juliusolsson05 merged 3 commits into
mainfrom
fix/codex-cyber-block-native-clone

Conversation

@Juliusolsson05

Copy link
Copy Markdown
Owner

Problem

Remove Cybersecurity Block ran the Codex native-resume projector on a same-provider fork. On the real session 01a08846-936d-7dd3-a91b-0f933d0d9f29 that wrote 7ef23509-c0b4-4e30-b46f-7ed58d382b81 and threw away the useful transcript:

  • 30 response_item.agent_message records (encrypted subagent payloads) became opaque and were dropped
  • 30 inter_agent_communication_metadata records were dropped
  • custom_tool_call_output.output went from Codex’s native array to a JSON string
  • extra task_started / turn_context / empty task_complete framing was synthesized

That is why the recovered feed looked unusable.

Behavior

Same-provider cyber-block recovery now copies native JSONL up to the last-model-step cut, rewrites session_meta.id, and appends a clean task_complete only so Codex does not immediately resample the flagged tail.

Rewind/duplicate still use the projector. That is a separate issue.

Tests

testing/fixtures/codex-cyber-policy-native-clone/source.jsonl is a redacted structural copy of the observed rollout. The clone test asserts:

  • agent_message and inter_agent_communication_metadata survive
  • kept tool output stays an array
  • last tool cycle and cyber_policy are gone
  • a second assertion documents that projectNativeResume still drops those records, so this path must not go back to it

Fixes #869

The projector dropped encrypted multi-agent records from a real
rollout. Same-provider recovery has to copy native JSONL.

Refs #869
The native-resume projector dropped encrypted agent_message records
and stringified tool outputs. Same-provider recovery copies the
source rollout up to the last-model-step cut.

Fixes the unusable fork of 01a08846. Refs #869
Codex refuses to append a paginated rollout whose last line has no
ordinal, and resume uses session_id as the live thread. The synthetic
complete now continues the last kept ordinal, and root clones rewrite
session_id together with id.

Refs #869
@Juliusolsson05
Juliusolsson05 merged commit fddf259 into main Sep 11, 2026
2 checks passed
@Juliusolsson05
Juliusolsson05 deleted the fix/codex-cyber-block-native-clone branch September 11, 2026 17:04
Juliusolsson05 added a commit that referenced this pull request Sep 11, 2026
Brings #860 (New Agent In), #861 (Reader Mode from the render ledger) and
#870 (Codex cyber-block native clone) into the branch before merge. The
textual merge is clean; eight files changed on both sides, so the merged
tree is re-verified with tsc and the full suite rather than trusting the
pre-merge CI run.

Refs #865

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LEwGeHkkhnDxU3X3chXX3F
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.

bug(codex): cyber-block fork drops multi-agent transcript records

1 participant