Skip to content

feat(task): support subagent context forking#22398

Open
shaojunxu-1981 wants to merge 1 commit intoanomalyco:devfrom
shaojunxu-1981:feat/task-fork-context-reasoning-effort
Open

feat(task): support subagent context forking#22398
shaojunxu-1981 wants to merge 1 commit intoanomalyco:devfrom
shaojunxu-1981:feat/task-fork-context-reasoning-effort

Conversation

@shaojunxu-1981
Copy link
Copy Markdown

@shaojunxu-1981 shaojunxu-1981 commented Apr 14, 2026

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds fork_context and reasoning_effort to the task tool so new subagent sessions can either inherit the current session history or stay isolated, and optionally override reasoning effort for that launch. This wires the new fields through session creation and prompt/model handling, updates the generated JS SDK and agent docs in both English and Chinese, and adds coverage for isolated vs forked child sessions plus reasoning override behavior on new and resumed tasks.

How did you verify your code works?

  • npx -y bun typecheck
  • npx -y bun test --timeout 30000 test/tool/task.test.ts
  • targeted prompt-effect reasoning tests
  • npx -y bun ./script/build.ts in packages/sdk/js

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add fork_context to let new task subagents fork the parent session history when needed. Also add reasoning_effort overrides for new subagent launches without changing resumed task sessions.
@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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