Harness spec 3.2.0 in the CLI: effort levels, reasoning round-trip, no absolute paths
ci / check (push) Waiting to run

Levels (models/schema.json levels): provider/effort.ts levelsOf/levelFields/
readLevel — `off` only with thinking_switch and sends enable_thinking false
and no effort, `default` for a model that takes no efforts and sends
nothing, a level not offered is read as the start level. The engine's
effort is a level; /effort shows nothing for one level, a Thinking switch
for [off, X], a list otherwise; the status bar follows. /v1/models'
thinking_switch, efforts [] and capacity.parallel are read
(lembas/webui.ts); session/capacity.ts counts parallel slots.

Reasoning (context.md §8): an assistant message of the current turn
carries reasoning_content (provider/common.ts turnReasoning,
openai-chat.ts); step-boundary deliveries, nudges and the wrap-up are
marked turn: false and do not start a turn.

Paths (context.md §11): the <env> block names the project and, started
below the root, that directory relative to it (assemble.ts envLines);
instruction files and @ attachments are named from the root or as ~/…;
file tools and bash resolve relative paths against the project root.

The team rules (team/team.ts) and conformance runners for levels,
reasoning, paths and team; the team runtime follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Opus 5.5 committed 2026-11-09 08:36:55 +00:00
1 parent 5c23087cef
commit fbefe7f844
36 files changed
+1168 -153

No files matched your search

+7 -5
View File
@@ -93,18 +93,20 @@ describe("history", () => {
})
describe("the context meter", () => {
test("counts the reply's thinking only until it is dropped from the next request", async () => {
test("counts a reply's thinking while its turn goes on (it is sent back), not after the turn's final reply (context.md §8)", async () => {
const dir = setup([
{ chunks: [delta({ reasoning_content: "x".repeat(4000) }), toolCall(0, "l1", "list", "{}"), usage(1000, 1100)] },
{ chunks: [delta({ content: "ok" }, "stop"), usage(1150, 5)] },
{ chunks: [delta({ reasoning_content: "y".repeat(4000) }), delta({ content: "ok" }, "stop"), usage(2150, 1100)] },
])
const app = createApp({ cwd: dir, mode: "edit", asker: noAsk, store: false })
const used: number[] = []
app.bus.on((e: Event) => e.type === "usage" && e.used !== undefined && used.push(e.used))
await app.engine.prompt("go")
// 1000 in + 1100 out, of which ~1000 thinking that is not sent again: ~1100, not 2100.
expect(used[0]).toBeLessThan(1200)
expect(used[0]).toBeGreaterThan(1000)
// The step that called a tool: its ~1000 tokens of thinking go back with the next step.
expect(used[0]).toBeGreaterThan(2000)
// The final reply: 2150 in + 1100 out, of which ~1000 thinking the next turn does not send.
expect(used[1]).toBeLessThan(2400)
expect(used[1]).toBeGreaterThan(2150)
})
})