Host tools register into the kernel workspace and fail closed on a name clash.
Usage is a process event, and each step exposes its work directory plus a tool-call cap.
Test plan
go test ./adapters/native/ ./runtime/ -count=1
## Summary
- Host tools register into the kernel workspace and fail closed on a name clash.
- Usage is a process event, and each step exposes its work directory plus a tool-call cap.
## Test plan
- [x] go test ./adapters/native/ ./runtime/ -count=1
Why: product runners need register_artifact and card tools inside the kernel loop, and the UI needs token usage on the same event stream as text and tool calls.
Evidence: go test ./... in agent-native; TestHostToolAndUsageEvent and TestHostToolNameConflictFailsClosed.
Impact: Options.HostTools fail closed on name clashes; ProcessEvent and runtime events gain a usage type with token counts. Existing callers that ignore unknown event types stay compatible.
Refs: deliverable-quality-system B1
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Host tools need the kernel workspace to register files the step just wrote, and product budgets must stop a step that keeps calling tools.
Evidence: go test ./adapters/native/ ./runtime/ -count=1 passed, including the workdir visibility test.
Impact: Host tools can read WorkDir from context. MaxToolCalls limits one kernel step when the request budget leaves it unset.
Refs: deliverable-quality-system B1
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen
merged commit ec731addef into main2026-10-01 09:35:55 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Test plan