Skip to content

fix(workflows): expose call capacity in sandbox usage - #94

Merged
tt-a1i merged 1 commit into
mainfrom
codex/workflow-usage-limits-release
Aug 23, 2026
Merged

fix(workflows): expose call capacity in sandbox usage#94
tt-a1i merged 1 commit into
mainfrom
codex/workflow-usage-limits-release

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

问题

Workflow V2 的 host 已经把 controller.capacity() 放进 usageSnapshot().limits,Skill 和模型提示也要求脚本使用 usage().limits.callsRemaining 做动态 fan-out;但 sandbox child 在重建 usage() 返回值时只复制了 token/cost/agents 字段,静默丢弃了 limits

真实 run wf_815de99b4a45 因此在 Discovery 完成后失败:

TypeError: Cannot read properties of undefined (reading 'callsRemaining')

修复

  • 在 sandbox 边界显式投影并数值校验 limits 四个 Runtime facts;
  • 将嵌套对象纳入既有 deepFreeze,模型脚本不能篡改容量;
  • 增加真实脚本形状的回归测试,修复前稳定失败、修复后通过。

验证

  • bun run check
  • Node 860/860 ✅
  • Vitest 30/30 ✅
  • git diff --check

这是 0.4.0 发布阻塞修复;不包含 Issue #93 的 child transcript UI 改动。

@tt-a1i
tt-a1i merged commit 95eec12 into main Aug 23, 2026
2 checks passed
@tt-a1i
tt-a1i deleted the codex/workflow-usage-limits-release branch August 23, 2026 16:26
@tt-a1i tt-a1i mentioned this pull request Aug 23, 2026
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