Repository navigation
feat(aikit): carry prompt content and sections in transcript system messages - #115
Merged
Merged
Conversation
…essages System messages now carry `content` and named `sections` (null removes one) next to tool changes. Replaying them on top of `Context.systemPrompt` gives the current prompt. Models with `supportsMidConvoSystemMessages` on our Responses transport get each change in place as a developer message, so the cached prefix survives; every other transport gets the current prompt as its leading system prompt. The catalog sets the new flag for the Codex and Copilot Responses models that accept developer messages mid-conversation, and in-place tool declarations (`changes`) now require it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…elog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Transcript system messages could only change tools. They now also change the system prompt, so a prompt section can change mid-conversation without re-rendering the leading prompt.
SystemMessagegainscontent(instructions from that point on) andsections(named, replaced by name,nullremoves one).Context.systemPromptgives the current prompt (Transcript.getCurrentSystemPrompt). A removed section added again goes last.supportsMidConvoSystemMessagescompat flag, on our own Responses transport, keep the leading prompt and get each change as a developer message (Updated system prompt section "name": …). The cached prefix survives.supportsMidConvoSystemMessagesfor the Codex and Copilot Responses models that accept developer messages mid-conversation. In-place tool declarations (changes) now require it; every model withsupportsAdditionalToolsalso gets the flag, so nothing changes in practice.The harness does not emit sections yet; that is the next change.
CHANGELOG.mdnotes both additions under[Unreleased]→@codeworksh/aikit.Testing
test/transcript.test.ts.test/e2e/sections.e2e.test.tschanges acodewordsection from alpha to bravo mid-conversation; all six providers answer bravo. Artifacts intest/e2e/__artifacts__/sections.*.json: openai-codex and github-copilot/responsesin place, anthropic, openai, google and openrouter folded.tools.added,codexandgithub-copilote2e suites still pass.vp check, aikit and harness typecheck, aikit and harness unit tests pass.A local
models.gen.jsonneeds regenerating with aikit modelgen to pick up the new flag.🤖 Generated with Claude Code