Skip to content

fix(agent): show Codex subagent activity#3523

Open
MattPua wants to merge 3 commits into
mainfrom
posthog-code/show-codex-subagent-activity
Open

fix(agent): show Codex subagent activity#3523
MattPua wants to merge 3 commits into
mainfrom
posthog-code/show-codex-subagent-activity

Conversation

@MattPua

@MattPua MattPua commented Jul 16, 2026

Copy link
Copy Markdown
Member

Problem

Codex subagents only showed lifecycle calls, so users could not see what delegated agents were doing.

CleanShot 2026-07-16 at 14 42 36@2x

Changes

  • Route Codex child-thread messages, reasoning, and tool calls into the existing subagent UI
  • Namespace child tool IDs to prevent collisions with parent calls
  • Add canonical parent tool metadata and regression coverage

How did you test this?

  • Focused agent, shared, and UI tests
  • Shared, agent, and UI typechecks
  • Platform, shared, and agent builds
  • Repository pre-commit typecheck

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: d8f51f0f-0f93-47ef-9c93-4b70efc02672
@trunk-io

trunk-io Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit a1b390c.

Generated-By: PostHog Code
Task-Id: 38f87de0-3672-400f-af61-378f74c17f2b
@MattPua
MattPua marked this pull request as ready for review July 16, 2026 18:54
@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(agent): preserve resumed subagent ac..." | Re-trigger Greptile

Comment on lines +1370 to +1371
const parentToolCallId = this.subagentParents.get(threadId);
if (!parentToolCallId) return null;

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 Early Child Activity Is Dropped

When a child-thread notification arrives before the parent collabAgentToolCall notification records its relationship, this lookup misses and permanently discards the child update. Concurrent subagent startup can therefore hide the agent's initial message, reasoning, or tool activity instead of buffering it until the parent is known.

Preserve child-thread messages, reasoning, and tool activity that arrive before the parent collaboration call is observed.

Generated-By: PostHog Code
Task-Id: acb27526-5140-4f34-9024-1df8d5c241a8
@MattPua
MattPua marked this pull request as draft July 16, 2026 19:22
@MattPua
MattPua marked this pull request as ready for review July 17, 2026 13:14
@MattPua
MattPua requested a review from a team July 17, 2026 13:43
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