anthropics / anthropics/claude-code

Workflow traces: record per-agent `model` and `effort` (override + resolved) in the per-agent progress records

未关闭
#92,990 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area:agents enhancement
主要语言
Python
星标
145k
派生
23.1k
PR 合并指标
PR 指标待抓取

描述

## Feature request

The Workflow tool's `agent(prompt, opts)` accepts per-call `model` and `effort` overrides, but the persisted run trace's per-agent records (`workflowProgress[]` / the run's `wf_.json`) do not record either — neither the override passed nor the resolved value the agent actually ran with.

**Measured motivation** (one team's adjudication harness, 2026-09-02 → 09-07 window): 91 orchestration scripts pinned `effort: 'high'` per agent and 718 agent runs executed; 0 of 718 trace records carry the effort or model the agent ran with. The only model attribution available is (a) session-level metadata, which breaks on per-agent overrides and on `model_refusal_fallback` substitutions, and (b) label-string conventions baked into prompts — we are currently running a paired verify-model A/B where the arm key is a `verify:A:` / `verify:B:` label prefix, which any label edit silently breaks.

**Ask:** per agent record, persist

- `model`: the resolved model id the agent ran on (post-fallback, so a `model_refusal_fallback` substitution is visible per agent), and
- `effort`: the resolved reasoning effort,
- optionally a flag or the raw override value distinguishing "inherited from session" from "overridden by the script".

This makes per-agent cost/latency attribution and model A/Bs first-class trace reads instead of label archaeology.

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by finding where Workflow agent(prompt, opts) builds workflowProgress[] and writes wf_.json, then trace where per-call model/effort overrides are resolved and where model_refusal_fallback may substitute the model. Done means each per-agent progress record persists the resolved model and effort, with an optional inherited/override signal, and existing trace readers/tests still pass.

由索引模型根据 Issue 内容生成。

评估

领域
ai-infra-agents, cli, observability
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。