镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Show recorded Codex scripts in Activity - #1413

Merged
salman1993 merged 4 commits into
mainfrom
sol/activity-harness-tool-details
Oct 20, 2026
Merged

salman1993 merged 4 commits into
mainfrom
sol/activity-harness-tool-details

Conversation

@salman1993

@salman1993 salman1993 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

Codex's Activity transcript shows the tools called by a script but omits the script itself. A single exec loop can therefore look like many separate model calls.

What

Show recorded exec scripts and wait calls with their original names, inputs and readable results. Group the underlying execution records beneath the script and highlight tools.xyz(...) references.

How

Read the rollout path returned by Buzz's Codex app-server through the existing file reader, using an absolute working directory. Restore missing script calls alongside the existing history. After a script yields or executions overlap, later calls stay separate because their parent is uncertain. Yielded scripts retain their separate wait records. Commands with earlier or missing start times stay separate. Recorded failures and terminations retain their status.

Reuse the existing transcript disclosures, code blocks and semantic accent color. There is no new dependency or lookup in ~/.codex/sessions.

Risk

This changes the local Codex history display. An unavailable or oversized rollout retains app-server history and shows a warning.

Testing

  • Read a real Codex 0.163.0 session through app-server and the file reader: six scripts and nine child calls restored, with the original script and output intact.

  • Rendered that session with the production transcript component in Chromium and WebKit. Checked both themes, narrow/wide widths, enlarged text, tool highlighting, nested calls and keyboard/pointer disclosures.

  • Salman tested the desktop Activity tab and confirmed the transcript looks correct. The later fix for uncertain call grouping has parser regression coverage and independent review; native reproduction of that edge case remains deferred.

  • Follow-up regressions reproduce delayed command attribution and failed/terminated wrapper handling before the fixes. Independent review passed. Chromium/WebKit verified the status labels and existing danger styling in both themes, narrow/wide layouts and keyboard/pointer interaction. Native confirmation of these follow-up cases remains deferred.

Generated with Codex

salman1993 and others added 2 commits October 20, 2026 11:59
Restore exec and wait calls from Buzz's Codex rollout so Activity shows
scripts and results with their recorded tool names. Keep execution records
under the active script and highlight tool references in its input.

Co-authored-by: Sol <4ea9f38a14e66809d462a705d31779034f9e606c3cec91cd7b5970c0f226190e@buzz.block.builderlab.xyz>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
A yielded script can still produce tool events after another exec starts.
Keep later events independent once yielding or overlap makes their owner
uncertain, rather than attaching them to the remaining active script.

Co-authored-by: Sol <4ea9f38a14e66809d462a705d31779034f9e606c3cec91cd7b5970c0f226190e@buzz.block.builderlab.xyz>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
@salman1993

Copy link
Copy Markdown
Contributor Author

Codex uses CodeMode for latest models (GPT 6 onwards), so activity transcript shows that now

Screenshot 2026-10-20 at 11 56 47 AM

@salman1993
salman1993 marked this pull request as ready for review October 20, 2026 16:18
@salman1993
salman1993 requested a review from a team as a code owner October 20, 2026 16:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T16:22:42.569923Z e8544b6 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: e8544b67d7

ℹ️ 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 src/bundled/codex/recorded-tools.ts Outdated
Comment on lines +100 to +102
item.status = item.output.includes("Script running with cell ID")
? "yielded"
: "completed";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Restrict yielded detection to the wrapper status

When a successfully completed script merely prints Script running with cell ID—for example, an rg command finds that text in source or logs—this substring check marks the script as yielded even though the result envelope says it completed. It also permanently marks the turn ambiguous, so later calls are no longer grouped under their scripts. Parse or anchor the execution wrapper's status line rather than searching the entire output.

Useful? React with 👍 / 👎.

A script can print the yield message as ordinary output. Restrict status
detection to the execution wrapper prefix so completed scripts keep their
status and subsequent tool calls remain grouped.

Co-authored-by: Sol <4ea9f38a14e66809d462a705d31779034f9e606c3cec91cd7b5970c0f226190e@buzz.block.builderlab.xyz>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 The wrapper-prefix repair is verified. Two P2 defects remain in command attribution and failed-script status; details inline.

(item.type === "tool" || (item.type === "message" && item.posted))
) {
parent.children ??= [];
parent.children.push(item);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P2] Keep delayed command completions out of unrelated scripts

Script A can start a yielding tools.exec_command and finish while its process continues. If that process exits while script B is the sole active exec, the delayed CommandExecution item_completed record is assigned to B here. The transcript then attributes the command, and potentially its failure, to a script that did not start it. Check the recorded started_at_ms against the parent start time before nesting; retain earlier-started commands at top level when ownership cannot be established. Add a regression where a command starts in A and completes during B.

Comment thread src/bundled/codex/recorded-tools.ts Outdated
// Its separately recorded wait calls retain that handle and output.
item.status = item.output.startsWith("Script running with cell ID ")
? "yielded"
: "completed";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 [P2] Preserve failed and terminated script status

The prefix repair handles genuine yields, but every other wrapper still maps to completed. Synthetic producer-shaped inputs with Script failed or Script terminated headers both restore as completed, hiding unsuccessful execution in the Activity transcript. Parse the wrapper status explicitly and preserve failure/termination through the transcript status and rendering. Add regression cases for these headers; the existing quoted-yield cases do not cover them.

Keep commands that started before the active script outside that script.
Read failed and terminated wrapper headers explicitly and show termination
in the transcript summary.

Co-authored-by: Sol <4ea9f38a14e66809d462a705d31779034f9e606c3cec91cd7b5970c0f226190e@buzz.block.builderlab.xyz>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Both P2s are resolved: delayed commands remain independent of later scripts, and failed/terminated statuses are preserved. Verified with regression tests and real Codex persistence replay; no new actionable findings. Required CI still needs a successful rerun after the timing-artifact upload timeout; the Vitest steps passed.

@salman1993
salman1993 merged commit cf56246 into main Oct 20, 2026
69 of 71 checks passed
@salman1993
salman1993 deleted the sol/activity-harness-tool-details branch October 20, 2026 18:30
wpfleger96 pushed a commit that referenced this pull request Oct 20, 2026
…-sessions

* origin/main: (23 commits)
  Add Marketplace tab and shared agent profile panels (#1411)
  fix: publish scoped typing indicators from conversation composers (#1435)
  feat: add configurable composer and pane focus shortcuts (#1418)
  perf(messages): reuse captured video opening frames on remount (#1437)
  FOR OCT 22: let agents clone and push their channel's repository (#1324)
  perf(relay): keep row profile map identity while new authors load (#1431)
  perf: avoid redundant relay channel derivation (#1412)
  Normalize dialog sizing, headers, spacing, and motion (#1403)
  Polish agent activity pills and popover actions (#1429)
  feat(agents): ask to resume claude and codex turns stopped by reload or quit (#1235)
  test(sign-out): join listed paths with / so the tests pass on Windows (#1247)
  fix(deps): remove distrusted emsign certificate roots (#1436)
  fix(plugins): distinguish usage and costs from agent activity (#1392)
  refactor(design-system): extract named Appearance palettes and revise plugin gradients (#1339)
  fix(channels): cancel inert activity popover opens (#1426)
  fix(codex): set up Codex in a dialog from the agent creation card, as Claude does (#1419)
  Add community-local settings (#1363)
  Fix sidebar and pane header alignment (#1409)
  Show recorded Codex scripts in Activity (#1413)
  fix(agents): restore emoji avatars in the agent avatar picker (#1404)
  ...

# Conflicts:
#	crates/agent-controller/src/app_agent.rs
wpfleger96 added a commit that referenced this pull request Oct 20, 2026
…-sessions

* origin/main: (23 commits)
  Add Marketplace tab and shared agent profile panels (#1411)
  fix: publish scoped typing indicators from conversation composers (#1435)
  feat: add configurable composer and pane focus shortcuts (#1418)
  perf(messages): reuse captured video opening frames on remount (#1437)
  FOR OCT 22: let agents clone and push their channel's repository (#1324)
  perf(relay): keep row profile map identity while new authors load (#1431)
  perf: avoid redundant relay channel derivation (#1412)
  Normalize dialog sizing, headers, spacing, and motion (#1403)
  Polish agent activity pills and popover actions (#1429)
  feat(agents): ask to resume claude and codex turns stopped by reload or quit (#1235)
  test(sign-out): join listed paths with / so the tests pass on Windows (#1247)
  fix(deps): remove distrusted emsign certificate roots (#1436)
  fix(plugins): distinguish usage and costs from agent activity (#1392)
  refactor(design-system): extract named Appearance palettes and revise plugin gradients (#1339)
  fix(channels): cancel inert activity popover opens (#1426)
  fix(codex): set up Codex in a dialog from the agent creation card, as Claude does (#1419)
  Add community-local settings (#1363)
  Fix sidebar and pane header alignment (#1409)
  Show recorded Codex scripts in Activity (#1413)
  fix(agents): restore emoji avatars in the agent avatar picker (#1404)
  ...

Co-authored-by: Will Pfleger <wpfleger@block.xyz>
Signed-off-by: Will Pfleger <wpfleger@block.xyz>
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.

2 participants