Skip to content

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

Closed

Description

@lydakis

Leftovers from Codex's review of #365.

1. Key the last-used lead note by store as well as folder

#365 (comment)

~/.agent/sonny/last-lead/<fingerprint(dir)> is keyed by folder only, so two stores under one HOME share it. Writing to shop.lead.billing in store A changes which lead store B opens next.

Since #365, a lead the note names that this store doesn't have opens the first lead instead of failing. When both stores have the named lead, though, store B can still open a conversation that wasn't the last one used there.

Fix: put the daemon's or store's identity in the note's key, as the multiplexer place records already do.

2. A deleted lead's surviving tasks pass to the first lead

#365 (comment)

Suppose shop.lead.billing is deleted while its task shop.invoices lives on. On the next subscription reload, Lookout::roots rebuilds theirs only from leads still in the records. The billing lead no longer seeds it, so shop.invoices falls back under the first lead's shop.* glob and its news reaches shop.lead.

Fix: seed theirs from surviving bots whose created_by names a sibling lead (shop.lead.*), even when that lead is gone. The alternative is to keep theirs across reloads.

Activity

  1. changed the title [-]Sonny: key the last-used lead note by store as well as folder[/-] [+]Sonny several leads: leftovers from #365 (last-used note per store; a deleted lead's tasks)[/+] on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions