Task template arguments#403
Merged
s-kostyaev merged 10 commits intomainfrom Apr 29, 2026
Merged
Conversation
Extend the task tool to render prompt templates from relative template paths with object-based substitution, strict path checks, validation hints, and callback-based errors. Add tests for rendering, validation feedback, and path traversal rejection.
Add an option to display session buffers whenever session-backed generation starts. Stream task subagents into their worker session buffers so enabling the option reveals subagent sessions with their output, and cover the behavior with tests.
Insert task prompts into worker session buffers as Main agent turns before streaming subagent responses. Preserve existing worker session metadata when adding task state and stream responses after the inserted assistant header.
Capture the worker session, buffer, tools, and system prompt in task loop callbacks so subagent continuations do not depend on the provider callback buffer after tool calls. Store the subagent system prompt in session extra and add regression coverage for continuing from a buffer with no current session.
Document task tool prompt templates, template path resolution, argument validation hints, subagent continuation behavior, and session buffer display. Regenerate the Info manual from README.org.
Normalize stored tool-use arguments before sending chat prompts so OpenAI-compatible providers can serialize retried tool-call history with raw UTF-8 or JSON-string arguments. Add regression tests for unibyte JSON arguments and malformed JSON fallback.
Decode unibyte strings in provider chat request data before request serialization so OpenAI-compatible tool-call arguments generated by older or mixed llm versions remain JSON serializable. Add a regression test for unibyte function argument strings.
Use locate-user-emacs-file for the task template directory default to satisfy package-lint. Make the provider request sanitization regression construct an explicit unibyte string so it passes across Emacs versions with different json-serialize string representations.
Collect streaming tool calls using the maximum emitted tool-call index so multi-call batches no longer write past the collector vector. Add a regression test covering multiple OpenAI-compatible tool calls in one streaming chunk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.