Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): show subagent context in Agents panel #12013

Closedcardoso-neto(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/12013/headopened View on GitHub

Showing 12 changed files with 69 additions and 30 deletions (loading 9).

x
0 of 12 viewed, 12 left
8 additions and 1 deletionapps/server/src/provider/Layers/ClaudeAdapter.test.tsModified
View file
@@ -3763,7 +3763,7 @@
- it.effect("a subagent snapshot that beats task_started still wins over the seed", () => {
+ it.effect("a subagent snapshot that beats task_started preserves its model and context", () => {
const harness = makeHarness();
return Effect.gen(function* () {
const adapter = yield* ClaudeAdapter;
@@ -3798,6 +3798,7 @@
parent_tool_use_id: "toolu_agent_early",
message: {
model: SYNTHETIC_SUBAGENT_MODEL,
+ usage: { input_tokens: 20, cache_read_input_tokens: 10, output_tokens: 5 },
content: [],
uuid: "early-snapshot-uuid",
@@ -3834,6 +3835,12 @@
assert.equal(progress?.type, "task.progress");
if (progress?.type === "task.progress") {
assert.equal(progress.payload.model, SYNTHETIC_SUBAGENT_MODEL);
+ assert.deepEqual(progress.payload.typedUsage, {
+ totalTokens: 100,
+ usedTokens: 35,
+ toolUses: 1,
+ durationMs: 10,
+ });