Skip to content

fix(cli): resume and chat run their turns on a session token with the sibling watcher (#428, 3/3) - #432

Merged
ajianaz merged 1 commit into
developfrom
refactor/cli-turn-cancel
Oct 26, 2026
Merged

ajianaz merged 1 commit into
developfrom
refactor/cli-turn-cancel

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

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 refactor(cli): one memory loop for every face (#428, 2/3) #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.)

… sibling watcher (#428, 3/3)

turn_runner::cli_turn_token returns the CLI session's cancel token and, in a child agent, the sibling watcher that queues change notices on it (#380). run, resume and chat all use it; resume and chat now call run_turn_with_cancel / resume_turn_with_cancel, so a child running tole chat or tole resume receives sibling notices like tole run. The sibling e2e covers all three faces and runs serially (timing-based scenario).
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 51031f9 into develop Oct 26, 2026
16 checks passed
@ajianaz
ajianaz deleted the refactor/cli-turn-cancel branch October 26, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(cli): one session turn runner for every face

1 participant