Repository navigation
feat: the backend sees how far the characters' exchange has gone, and a reply without address_character ends it - #2169
Merged
Merged
Conversation
…s_character out ends it
…character ends it by omission
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
The characters may trade more turns, up to the cap the user sets on the Together page. An exchange with nothing new in it still has to end early. Whether to go on stays the backend's judgment, so the backend is now told how far the exchange has gone and that a reply without
address_characterends it.usedcounts against the chain cap: the per-window total since that character's last user turn. It is not "reply N of one conversation", because a bundled turn can count several addressed entries (waiting-release.ts).addressed_cap), with range 1–999 and default 2.Not breaking: this adds a line and a sentence and removes nothing.
Related issues
Closes #2167
Part of #2108
Related decisions / docs
D-75. Docs touched:
docs/reference/client-context.md(§ Rendered lines, § Addressed),docs/reference/client-tools.md(§ address_character),GLOSSARY.md(Chain cap),docs/agent-guide/architecture/map.js.Runtime evidence (required for UI / DOM / runtime behavior)
A real model (claude-sonnet-5-5) ran through a throwaway Hermes gateway on the push transport. The shipped
address_characterschema was declared inhello, and the turn text was rendered by the shipped code at 489462d:address_charactercalled{"to":"alice"}On this model an exchange with nothing new ends at the first reply with or without the line, and the tool is still called when there is something to answer. The runs show the change does not break either path, but they do not isolate the line's own effect. Weaker tool-calling models are a documented limitation (D-76). Also not verified: the Together row's new strings in the running app.
Merge danger
Door: two-way. Blast radius: addressed turns between open characters only, as one added context line and one added description sentence.
Verification
pnpm buildpasses (includes tsc typecheck)pnpm testpassespnpm lintpasses (biome format + lint)cargo test/cargo clippypass (Rust changes): no change undersrc-tauri/pnpm gates: all 16 gates exit 0.bash scripts/red-run.sh e23143a3: 3 cases added, 3 red, 0 harness, 0 passes. The updated verbatim description assertion also failed before the change.Review: a spec review before code (gpt-6.2 sol, verdict trim, all findings folded in), then a lead review of the diff: two fixes, the formatting and the stamp moved out of
dispatcher.ts.Checklist (YUI principles)
docs/reference/client-context.mdalongside the codedocs/agent-guide/architecture/map.jscarries every module, part, and exchange this PR adds, removes, or changes (or none changed)generate_expresstool-call argumentsconfigs/skip-testslabel justified)