Repository navigation
refactor(cli): one memory loop for every face (#428, 2/3) - #431
Merged
Merged
Conversation
turn_runner::with_recalled_memory (pre-turn recall injection, bare prompt on failure with a stderr note) and turn_runner::remember (best-effort session summary, reported on stderr) replace the copies in HostConfig and the session host. Server-face sessions no longer drop the remember result silently.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
ajianaz
added a commit
that referenced
this pull request
Oct 26, 2026
… sibling watcher (#428, 3/3) (#432) ## What `tole resume` and `tole chat` now run their turns on a session cancel token with the child-agent sibling watcher attached, like `tole run`. Part 3 of 3; closes #428. ## Why Only `tole run` created a cancel token and started the sibling watcher (#380); `resume` and `chat` called `run_turn` / `resume_turn` without a token. A child agent driven through `tole chat` or `tole resume` therefore never received sibling change notices. ## Changes - `turn_runner::cli_turn_token()`: the session's `CancelToken` plus, in a child agent, the watcher that queues sibling notices on it (a no-op outside a child). - `main.rs`: run uses it (replacing its inline copy); resume and chat create it once per session and call `run_turn_with_cancel` / `resume_turn_with_cancel`. - `sibling_notice_e2e.rs`: the two-child scenario now also runs with child A on `tole chat` and on `tole resume`. The tests in this file are serialized because the scenario is timing-based (B's edit must land inside A's slow step). - CHANGELOG (Fixed + Changed). ## Testing - New e2e `a_sibling_edit_reaches_a_child_running_tole_chat` / `..._tole_resume`: both fail on the previous `main.rs` and pass with this change; the original `run` scenario still passes. - `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings`, bare-profile clippy (none / shell-tools), `cargo test --workspace`: all green; rebased onto #431, rebuilt, lib and sibling tests re-run. - Cora agent-as-reviewer on the exact diff, judged from `review_finalize`: `should_block: false`, 0 issues. (`review_prepare` lists a `crypto/hardcoded-secret` hit on `CancelToken::default()`; it is a false positive and `.cora.yaml` already ignores it, which `finalize` applies.) Co-authored-by: ajianaz <[email protected]>
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.
What
The memory loop's pre-turn recall injection and session remember move into
turn_runner, used by every face. Part 2 of 3 of #428.Why
The CLI (
HostConfig::inject_memory/remember) and the session host each had their own copy. The session host's remember dropped its result silently, so a failing store ontole serve/ ACP went unnoticed.Changes
turn_runner::with_recalled_memory(memory, prompt): the prompt with the recalled block appended; no memory, nothing recalled, or a failed recall (stderr note, feat(memory): injection hygiene for the uteke integration — bounded, deduped, no silent fallback #384) gives the bare prompt.turn_runner::remember(memory, session_id, first_prompt, last_answer, wrote): best-effort summary, reported on stderr either way;first_promptis the pre-injection prompt, so recalled memory is never echoed back into the store.main.rs:HostConfig::inject_memory/rememberdelegate to them.session_host.rs: the first-turn recall and the per-turn remember use them; thefirst_prompt_donelock is released before the recall subprocess runs.Testing
utekebinaries: a hit is appended, an empty result and a failing binary both leave the bare prompt; remember stores the pre-injection prompt in the room (--room,--type decisionfor a write session); no memory is a no-op.cargo fmt,cargo clippy --workspace --all-targets -- -D warnings, bare-profile clippy (none / shell-tools),cargo test --workspace: all green; rebased onto refactor(cli): one session provider for every face (#428, 1/3) #430 and rebuilt.should_block: false, 0 issues (deterministic hits werebug-printlnon the intended stderr reporting andbug-expecton the existing lock pattern, both ignored by.cora.yaml).