Repository navigation
fix(requests): request-only turns stay where the reply's request had them #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nissa-seru
merged 15 commits into
anima-research:main
from
nissa-seru:fix/request-only-rows
Oct 18, 2026
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
ee43daf
fix(requests): request-only turns stay where the reply's request had …
6f08783
fix(requests): request-only turns render the text they were sent with…
1dd57c1
fix(requests): a reply follows [Continue] only when what it is sent e…
68f529f
fix(requests): end a reply's tool loop where its next round is handed…
5ac3c15
Merge main (14e25dc) into #284's branch
b7447fe
test(guard): the compile holds in two tests from main hook the stream…
de6a891
Merge main (770663602) into #284's branch
f5f749c
docs(requests): which stamped rows place a request-only turn; a reply…
083c910
refactor(requests): toolLoopPrompt drops a check its only caller has …
a9a9646
test(requests): the retry and cooldown tests wait for what they asser…
a96c4cd
Merge main (9c1e75773) into #284's branch
1895b2a
test(stop): a retry's failing compile fails the assembler the stream …
a72dedb
Merge main (d9bd6dc9) into fix/request-only-rows
d3c45a7
test(guard): a dropped turn's cancel-record test gates the assembler …
7850864
docs(agent): requestSettings()'s doc names the assembler that builds …
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| - **Code that sets or reads `InferenceRequest.ephemeralSystemPrompt`:** the | ||
| field is removed. It carried a system-position prompt for one turn; the | ||
| silent heartbeat was its only producer, and its instruction now rides the | ||
| tick's request-only separator. There is no replacement: a system prompt | ||
| that changes for one turn costs that request its prompt cache from the | ||
| system on, and changes what every retained signed-thinking block is bound | ||
| to. Nothing in this package or in connectome-host sets or reads it. | ||
| Unchanged: `suppressProse` and `silentHeartbeat` on `InferenceRequest`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| - A silent heartbeat tick's instruction now rides the tick's request-only | ||
| separator instead of a system-position injection, so a tick's request | ||
| carries the agent's own system prompt, like every other turn. A system | ||
| prompt that changed for one turn cost the heartbeat's request its prompt | ||
| cache from the system on, and on a provider that binds signed thinking to | ||
| the prefix it was minted under (context-manager #155) it failed every | ||
| retained thinking block in that request, and the tick reply's own thinking | ||
| at the next ordinary turn. `SILENT_HEARTBEAT_SEPARATOR` is now that | ||
| instruction (199 characters where it was 16, roughly 50 tokens at each | ||
| tick whose rows survive in the window). Each tick's rows now record the | ||
| separator their request rendered (`SilentHeartbeatStamp.separator`), and | ||
| later compiles render that text, so ticks stored before upgrading keep | ||
| their `[heartbeat tick]` marker byte for byte: no stored reply's prefix | ||
| changes. (`InferenceRequest.ephemeralSystemPrompt` is removed; see the | ||
| breaking entry.) | ||
| - A tick whose restart compiles none of the tick's rows (a strategy folded | ||
| them all) opens again: the restart's request ends on the separator, where | ||
| later compiles render it before the restart's reply. It used to end on | ||
| `[Continue]`, and later compiles put the separator before a reply whose | ||
| request never held it. | ||
| - When a compile ends on the agent's own message and the request gets a | ||
| trailing `[Continue]` turn, the reply's rows (its assistant responses and | ||
| tool results) now record that prompt (`metadata.promptedBy`, a | ||
| `{ turn, text }` pair), and every later request renders `[Continue]` | ||
| again just before the first of its assistant rows that survives, the way a | ||
| silent tick's separator is rendered. A later reply follows the same prompt | ||
| when what it is sent ends on the tool results of a reply that did: a next | ||
| round of the stream, a budget restart, an error retry, or a new process | ||
| reading the stored rows. A reply sent anything else after those results, | ||
| such as a message that arrived at the tool boundary or during a provider | ||
| cooldown, follows that instead and records no prompt. Without the turn, | ||
| later requests merged the reply into the previous assistant message (one | ||
| message carrying signed thinking from two responses, a 400 when it is the | ||
| latest), and dropped a turn the reply's request held, which a provider | ||
| that binds thinking refuses. A reply with neither a tool call nor signed or | ||
| redacted thinking can't be found in a compiled window and merges as | ||
| before. `StartStreamResult.continuePrompt` carries the prompt a stream's | ||
| request ends on (new, optional); the agent sets it. The direct | ||
| `runInference` paths compile without these request-only turns, as they | ||
| did without the tick separator, so their replies render none. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| - A silent heartbeat tick is now told apart by its server and its event id | ||
| together, so two servers' ticks whose events share an id each get their | ||
| own separator, before their own first row. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.