-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[WIP] feat: native subagent & workflow observability #5219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
t3dotgg
wants to merge
26
commits into
main
Choose a base branch
from
t3code/native-subagent-observability
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,440
−64
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e1b562b
feat: native subagent & workflow observability (Agents panel, quiet t…
t3dotgg 9be170a
feat(web): agent spawn CTA row replaces live strip and inline workflo…
t3dotgg 16cdc33
fix(web): honest workflow status, shell exclusion, flat panel rows
t3dotgg 4622c3a
fix(web): spawn CTA rows survive turn folding and work-group overflow
t3dotgg 3ee8054
fix(web): all in-flight subagent states present as Working
t3dotgg 4947acc
fix(web): show spawn CTA during the run, anchored at the spawn point
t3dotgg 8ebdb72
feat(web): sidebar liveness beyond the turn — Working and Monitoring
t3dotgg 3573c9c
fix(web): standard subagents join the roster — task-type denylist
t3dotgg 95c2047
fix: Codex collab children reach the CTA and panel with real names
t3dotgg 0984bab
fix: idle Codex agents present as settled; names survive progress rows
t3dotgg 23f75ed
fix(server): never intercept the Codex root thread as its own child
t3dotgg eb0fd9c
fix(web): one CTA per Claude parallel batch — pin membership at first…
t3dotgg a779285
fix(server): keep subagent-owned Claude traffic out of the parent tra…
t3dotgg 9262161
fix: subagent-internal shells attributed to their owning agent
t3dotgg b16ee95
feat(web): workflow phase rail + read-only script access
t3dotgg a266b19
feat: stop-everything interrupt + collapsible phase sections
t3dotgg 8d20b68
fix: CI + review round — lint, service conventions, TOCTOU, stop binding
t3dotgg 239a013
fix: effect-diagnostics conformance for CI Check
t3dotgg 77fa3f4
refactor(server): canonical ThreadBackgroundLiveness module, visible …
t3dotgg 3585e63
refactor(server): canonical make/layer exports + bucket reclassificat…
t3dotgg 2758593
refactor(contracts): structured reason on OrchestrationGetWorkflowScr…
t3dotgg 25de5b7
feat(web): background-work banner above composer with stop action
t3dotgg 3b84a19
feat: per-subagent model + reasoning effort, persisted and shown in p…
t3dotgg 4b6d276
fix: external review round — fold correctness, legacy rows, Codex bat…
t3dotgg 5ff1638
fix: terminal enrichment, Codex status linkage, mobile task.updated c…
t3dotgg 5d68958
feat(server): server-stamped task data shapes (stacked on #5219) (#5316)
t3dotgg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
apps/server/src/orchestration/ActivityPayloadProjection.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import { describe, expect, it } from "vite-plus/test"; | ||
| import type { OrchestrationThreadActivity } from "@t3tools/contracts"; | ||
| import { projectActivityPayload } from "./ActivityPayloadProjection.ts"; | ||
|
|
||
| function activity(payload: Record<string, unknown>): OrchestrationThreadActivity { | ||
| return { | ||
| id: "activity-1", | ||
| tone: "tool", | ||
| kind: "tool.completed", | ||
| summary: "Tool", | ||
| payload, | ||
| turnId: null, | ||
| createdAt: "2026-08-01T10:00:00.000Z", | ||
| } as unknown as OrchestrationThreadActivity; | ||
| } | ||
|
|
||
| /** | ||
| * Wire-survival regression: the slimming pass rewrites payload.data but must | ||
| * never strip the top-level per-agent fields the subagent fold depends on. | ||
| * If slimming ever moves to an allowlist over the whole payload, these | ||
| * assertions are the tripwire. | ||
| */ | ||
| describe("projectActivityPayload agent-field survival", () => { | ||
| it("preserves tool attribution (agentId/parentToolUseId) through data slimming", () => { | ||
| const projected = projectActivityPayload( | ||
| activity({ | ||
| itemType: "command_execution", | ||
| agentId: "task-123", | ||
| parentToolUseId: "toolu_abc", | ||
| data: { | ||
| toolName: "Bash", | ||
| input: { command: "ls" }, | ||
| command: "ls", | ||
| rawOutput: { content: "x".repeat(10) }, | ||
| somethingClientNeverReads: { big: "blob" }, | ||
| }, | ||
| }), | ||
| ); | ||
| const payload = projected.payload as Record<string, unknown>; | ||
| expect(payload.agentId).toBe("task-123"); | ||
| expect(payload.parentToolUseId).toBe("toolu_abc"); | ||
| // Slimming itself still applies to data. | ||
| const data = payload.data as Record<string, unknown>; | ||
| expect(data.somethingClientNeverReads).toBeUndefined(); | ||
| }); | ||
|
|
||
| it("passes task lifecycle payloads (no data field) through untouched", () => { | ||
| const source = activity({ | ||
| taskId: "task-9", | ||
| title: "Audit auth", | ||
| role: "explorer", | ||
| model: "opus", | ||
| effort: "high", | ||
| workflowName: "audit-flow", | ||
| phases: [{ index: 0, title: "Audit" }], | ||
| typedUsage: { totalTokens: 1200 }, | ||
| runHandles: { runId: "run-1", scriptPath: "/tmp/wf.js" }, | ||
| timelineBypass: true, | ||
| }); | ||
| const projected = projectActivityPayload(source); | ||
| expect(projected.payload).toEqual(source.payload); | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.