Skip to content

Sonny: each store notes its own last lead, and a gone lead's tasks stay off the first lead - #376

Merged
lydakis merged 1 commit into
mainfrom
claude/project-thread-k1awif-leads
Oct 29, 2026
Merged

lydakis merged 1 commit into
mainfrom
claude/project-thread-k1awif-leads

Conversation

@lydakis

@lydakis lydakis commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Fixes #368, the two leftovers from #365's review.

What changes

  1. Last-used lead, per store. ~/.agent/sonny/last-lead/<key> is now keyed by the store's lineage (ready's store) plus the folder. The multiplexer place records already key their files by socket plus project the same way. Before this, two stores under one HOME shared the note, so writing to a lead in store A changed which lead store B opened. With no lineage the key is the folder alone, as before. Codex's resume --last and Claude Code's --continue scope "last" to the place it was used, and this does the same.
  2. A deleted lead's tasks stay its own. Lookout::roots rebuilt theirs only from leads still in the records. So once shop.lead.billing was deleted, its surviving task shop.invoices fell under the first lead's shop.* glob, and its news reached shop.lead. Now a bot whose created_by names another lead of the folder is that lead's, whether or not the lead still exists. That holds on reload and for bots created later.

Tests

  • project::tests::each_store_notes_its_own_last_lead_in_a_folder
  • lookout::tests::a_gone_leads_tasks_stay_off_the_first_lead: a gone lead's task, that task's own task, and a later task are all kept off the first lead, while a stray shop.* bot is still heard.
  • cargo test -p sonny and cargo clippy --workspace --all-targets -D warnings pass locally.

No visible change, so no screenshots.

…ay off the first lead

The note of the lead last written to in a folder is now keyed by the
store's lineage as well as the folder, as the multiplexer places are,
so two stores under one home no longer move each other's pick.

A lead deleted while its tasks live on no longer hands them to the
folder's first lead: on a reload, a bot whose maker is named as another
lead of the folder is theirs, whether or not that lead is still there.

Fixes #368.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013jkdGH7ReQfFZ1hChr3jXE
@lydakis lydakis self-assigned this Oct 29, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T23:19:07.901754Z f3e4d35 PR opened
🔒 Security Review ✅ Completed 2026-10-29T23:20:04.359289Z f3e4d35 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lydakis
lydakis merged commit 0e92351 into main Oct 29, 2026
3 of 4 checks passed
@lydakis lydakis mentioned this pull request Oct 30, 2026
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.

Sonny several leads: leftovers from #365 (last-used note per store; a deleted lead's tasks)

2 participants