Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6ea45b3
feat(task): task-local thinking effort state, per-request override, a…
easonliang28 Aug 21, 2026
9275aa1
Merge remote-tracking branch 'upstream/main' into feat/dte-2-task-state
easonliang28 Aug 22, 2026
14d1f35
fix(task): keep override restore value current across profile switches
easonliang28 Aug 22, 2026
90b47b0
docs(task): JSDoc for diff-touched functions flagged by CodeRabbit
easonliang28 Aug 22, 2026
cce1aea
Merge remote-tracking branch 'upstream/main' into feat/dte-5-orchestr…
easonliang28 Aug 22, 2026
146c5c8
feat(task): orchestrator new_task thinking_effort
easonliang28 Aug 23, 2026
f6410bb
Merge remote-tracking branch 'upstream/main' into feat/dte-5-orchestr…
easonliang28 Aug 23, 2026
6ad8d86
test(e2e): new_task thinking_effort pass-through (DTE addendum)
easonliang28 Aug 23, 2026
4eb13a9
fix(task): new_task thinking_effort review fixes (boolean capability,…
easonliang28 Aug 23, 2026
f6e1178
Merge branch 'feat/dte-5-orchestrator' into feat/dte-5-e2e
easonliang28 Aug 23, 2026
4a6ee69
fix(task): forward new_task thinking_effort through native tool-call …
easonliang28 Aug 23, 2026
d301642
Merge branch 'feat/dte-5-orchestrator' into feat/dte-5-e2e
easonliang28 Aug 23, 2026
b8d878f
test(e2e): assert negative new_task thinking_effort rejection at the …
easonliang28 Aug 23, 2026
018f165
fix(task): keep new_task delegation alive when the fallback effort sa…
easonliang28 Aug 23, 2026
630c49d
Merge branch 'feat/dte-5-orchestrator' into feat/dte-5-e2e
easonliang28 Aug 23, 2026
026bca7
test(task): document partial provider double and assert delegation me…
easonliang28 Aug 23, 2026
3ea9f63
webview(chat): localize new_task thinking effort selector labels
easonliang28 Aug 23, 2026
4f88bce
test(e2e): allow the live Anthropic upstream in the effort proxy guard
easonliang28 Aug 23, 2026
471490b
Merge branch 'feat/dte-5-orchestrator' into feat/dte-5-e2e
easonliang28 Aug 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
189 changes: 189 additions & 0 deletions apps/vscode-e2e/src/fixtures/subtasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,192 @@ export function addSubtaskFixtures(mock: InstanceType<typeof LLMock>) {
},
})
}

// ---------------------------------------------------------------------------
// DTE series 5/5 — new_task thinking_effort pass-through (e2e).
//
// Three scenarios with unique, stable markers (no timestamps, no environment
// details):
// - INHERIT: the parent's new_task call carries NO thinking_effort — the child
// starts with the parent's current effective effort (PR-2 resolution) and the
// child's real request must carry it.
// - EXPLICIT: the parent's new_task call carries thinking_effort "high" on a
// model with a capability array — validation passes and the child subtask
// runs to completion on the real host.
// - NEGATIVE: the parent's new_task call carries thinking_effort on a model
// without a capability array — the tool rejects before the approval ask, no
// child is created, and the error is visible to the model.
export const DTE_NT_INHERIT_PARENT_MARKER = "DTE_E2E_NT_INHERIT_PARENT"
export const DTE_NT_INHERIT_CHILD_MARKER = "DTE_E2E_NT_INHERIT_CHILD"
const DTE_NT_INHERIT_CHILD_PROMPT = `${DTE_NT_INHERIT_CHILD_MARKER}: Complete immediately with the exact result "DTE inherit child completed".`
export const DTE_NT_INHERIT_PARENT_PROMPT = `${DTE_NT_INHERIT_PARENT_MARKER}: Use the new_task tool exactly once. Create an ask-mode subtask with this exact message: "${DTE_NT_INHERIT_CHILD_PROMPT}" Do not answer directly. When the subtask returns, complete with the exact result "DTE inherit parent resumed".`
export const DTE_NT_INHERIT_CHILD_RESULT = "DTE inherit child completed"
export const DTE_NT_INHERIT_PARENT_RESULT = "DTE inherit parent resumed"

const DTE_NT_EXPLICIT_PARENT_MARKER = "DTE_E2E_NT_EXPLICIT_PARENT"
const DTE_NT_EXPLICIT_CHILD_MARKER = "DTE_E2E_NT_EXPLICIT_CHILD"
const DTE_NT_EXPLICIT_CHILD_PROMPT = `${DTE_NT_EXPLICIT_CHILD_MARKER}: Complete immediately with the exact result "DTE explicit child completed".`
export const DTE_NT_EXPLICIT_PARENT_PROMPT = `${DTE_NT_EXPLICIT_PARENT_MARKER}: Use the new_task tool exactly once. Create an ask-mode subtask with this exact message: "${DTE_NT_EXPLICIT_CHILD_PROMPT}" Do not answer directly. When the subtask returns, complete with the exact result "DTE explicit parent resumed".`
export const DTE_NT_EXPLICIT_CHILD_RESULT = "DTE explicit child completed"
export const DTE_NT_EXPLICIT_PARENT_RESULT = "DTE explicit parent resumed"

export const DTE_NT_NEGATIVE_PARENT_MARKER = "DTE_E2E_NT_NEGATIVE_PARENT"
const DTE_NT_NEGATIVE_CHILD_MARKER = "DTE_E2E_NT_NEGATIVE_CHILD"
const DTE_NT_NEGATIVE_CHILD_PROMPT = `${DTE_NT_NEGATIVE_CHILD_MARKER}: Complete immediately with the exact result "DTE negative child completed".`
export const DTE_NT_NEGATIVE_PARENT_PROMPT = `${DTE_NT_NEGATIVE_PARENT_MARKER}: Use the new_task tool exactly once, with thinking_effort set to "high". Create an ask-mode subtask with this exact message: "${DTE_NT_NEGATIVE_CHILD_PROMPT}" Do not answer directly. If the tool call is rejected, complete with the exact result "DTE negative parent completed".`
export const DTE_NT_NEGATIVE_PARENT_RESULT = "DTE negative parent completed"

export function addDteNewTaskEffortFixtures(mock: InstanceType<typeof LLMock>) {
// INHERIT: parent turn -> new_task without an explicit effort.
mock.addFixture({
match: {
userMessage: new RegExp(DTE_NT_INHERIT_PARENT_MARKER),
sequenceIndex: 0,
},
response: {
toolCalls: [
{
name: "new_task",
arguments: JSON.stringify({
mode: "ask",
message: DTE_NT_INHERIT_CHILD_PROMPT,
}),
id: "call_dte_nt_inherit_new_task_001",
},
],
},
})

// Child turn: the child prompt is embedded verbatim in the parent prompt, so the
// parent-marker exclusion keeps parent turns out of this fixture (same collision
// class as the fast-child fixture above).
mock.addFixture({
match: {
predicate: (req: ChatCompletionRequest) =>
lastUserMessageContains(req, DTE_NT_INHERIT_CHILD_MARKER) &&
!requestContains(req, [DTE_NT_INHERIT_PARENT_MARKER]),
},
response: {
toolCalls: [
{
name: "attempt_completion",
arguments: JSON.stringify({ result: DTE_NT_INHERIT_CHILD_RESULT }),
id: "call_dte_nt_inherit_child_completion_002",
},
],
},
})

// Parent resume turn: guarded on the child-result injection (not the child result
// text, which the parent prompt embeds verbatim).
mock.addFixture({
match: {
predicate: (req: ChatCompletionRequest) =>
requestContains(req, [DTE_NT_INHERIT_PARENT_MARKER, SUBTASK_RESULT_INJECTION]),
},
response: {
toolCalls: [
{
name: "attempt_completion",
arguments: JSON.stringify({ result: DTE_NT_INHERIT_PARENT_RESULT }),
id: "call_dte_nt_inherit_parent_completion_003",
},
],
},
})

// EXPLICIT: parent turn -> new_task with thinking_effort "high" (valid on models
// whose capability array accepts it, e.g. deepseek-v4-pro).
mock.addFixture({
match: {
userMessage: new RegExp(DTE_NT_EXPLICIT_PARENT_MARKER),
sequenceIndex: 0,
},
response: {
toolCalls: [
{
name: "new_task",
arguments: JSON.stringify({
mode: "ask",
message: DTE_NT_EXPLICIT_CHILD_PROMPT,
thinking_effort: "high",
}),
id: "call_dte_nt_explicit_new_task_001",
},
],
},
})

mock.addFixture({
match: {
predicate: (req: ChatCompletionRequest) =>
lastUserMessageContains(req, DTE_NT_EXPLICIT_CHILD_MARKER) &&
!requestContains(req, [DTE_NT_EXPLICIT_PARENT_MARKER]),
},
response: {
toolCalls: [
{
name: "attempt_completion",
arguments: JSON.stringify({ result: DTE_NT_EXPLICIT_CHILD_RESULT }),
id: "call_dte_nt_explicit_child_completion_002",
},
],
},
})

mock.addFixture({
match: {
predicate: (req: ChatCompletionRequest) =>
requestContains(req, [DTE_NT_EXPLICIT_PARENT_MARKER, SUBTASK_RESULT_INJECTION]),
},
response: {
toolCalls: [
{
name: "attempt_completion",
arguments: JSON.stringify({ result: DTE_NT_EXPLICIT_PARENT_RESULT }),
id: "call_dte_nt_explicit_parent_completion_003",
},
],
},
})

// NEGATIVE: parent turn -> new_task with thinking_effort "high" on a model without a
// capability array. The tool rejects before the approval ask, so the next parent
// turn is the error-recovery completion (matched on the tool-error text, which only
// appears in a request after the rejected call).
mock.addFixture({
match: {
userMessage: new RegExp(DTE_NT_NEGATIVE_PARENT_MARKER),
sequenceIndex: 0,
},
response: {
toolCalls: [
{
name: "new_task",
arguments: JSON.stringify({
mode: "ask",
message: DTE_NT_NEGATIVE_CHILD_PROMPT,
thinking_effort: "high",
}),
id: "call_dte_nt_negative_new_task_001",
},
],
},
})

mock.addFixture({
match: {
predicate: (req: ChatCompletionRequest) =>
requestContains(req, [DTE_NT_NEGATIVE_PARENT_MARKER, "Invalid thinking_effort"]),
},
response: {
toolCalls: [
{
name: "attempt_completion",
arguments: JSON.stringify({ result: DTE_NT_NEGATIVE_PARENT_RESULT }),
id: "call_dte_nt_negative_parent_completion_002",
},
],
},
})
}
3 changes: 2 additions & 1 deletion apps/vscode-e2e/src/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { addTerminalProfileResultFixtures } from "./fixtures/terminal-profile"
import { addListFilesResultFixtures } from "./fixtures/list-files"
import { addReadFileResultFixtures } from "./fixtures/read-file"
import { addSearchFilesResultFixtures } from "./fixtures/search-files"
import { addSubtaskFixtures } from "./fixtures/subtasks"
import { addDteNewTaskEffortFixtures, addSubtaskFixtures } from "./fixtures/subtasks"
import { addUseMcpToolResultFixtures } from "./fixtures/use-mcp-tool"
import { addWriteToFileResultFixtures } from "./fixtures/write-to-file"
import { createScenarioWorkspace, removeScenarioWorkspace } from "./restart/scenarioWorkspace"
Expand Down Expand Up @@ -140,6 +140,7 @@ async function main() {
addReadFileResultFixtures(mock)
addSearchFilesResultFixtures(mock)
addSubtaskFixtures(mock)
addDteNewTaskEffortFixtures(mock)
addUseMcpToolResultFixtures(mock)
addWriteToFileResultFixtures(mock)
addDeepSeekV4Fixtures(mock)
Expand Down
Loading
Loading