Skip to content

feat(cli): wire sibling change notices into child agents (#380, 2/2) - #395

Merged
ajianaz merged 10 commits into
developfrom
feat/sibling-change-wiring
Oct 16, 2026
Merged

ajianaz merged 10 commits into
developfrom
feat/sibling-change-wiring

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

What

Part 2 of 2 of sibling change notices: the host wiring. Builds on the core merged in #394.

Why

#380. The core can track and notice, but nothing fed it yet.

Changes

  • agents.rs: agent_start sets TOLE_AGENT_ID and TOLE_AGENT_TOUCH_LOG (one <root>/tole-agents/touch.log shared by every sibling of a parent) in the child's environment.
  • sibling.rs (new, tole-cli lib): tracking_from_env (the id must pass the agent-id charset), track (wraps a file tool in the Tracked decorator; identity outside a child) and start_watcher (a thread folding the log every 300 ms and queueing each notice into the run's soft-interrupt queue; stops on drop).
  • main.rs: the file tools (read_file, write_file, edit_file, delete_file) are wrapped when tracking, and tole run starts the watcher. Outside a child nothing changes (no env, no wrapper, no thread). Compiles in the bare profile.
  • README, CHANGELOG.
  • Worktree mode: children there have disjoint roots, so their normalised paths never match and no notices are produced (nothing to conflict on).

Testing

  • Real binaries, two real child processes sharing one touch log (sibling_notice_e2e): child A reads shared.txt and waits on a slow model step; child B overwrites it meanwhile; A's next model request carries the attributed sibling notice and the mock only answers A_NOTICED if it does.
  • Unit: env parsing (malformed ids rejected), the watcher turns a sibling write into a queued notice, track is the identity outside a child, agent_start passes the id and the shared log path.
  • fmt, clippy -D warnings, cargo test --workspace and cargo check --no-default-features pass; cora review --staged clean.
  • Not done: a live run with two real agents on a real provider; feat(child-agents): conflict notification between sibling child agents sharing files #380 stays open for that.

Refs #380

@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 f42b072 into develop Oct 16, 2026
17 checks passed
@ajianaz
ajianaz deleted the feat/sibling-change-wiring branch October 16, 2026 05:53
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.

1 participant