Skip to content

Show and edit agent records over the link - #1836

Draft
loganj wants to merge 2 commits into
agents-link-runningfrom
agents-link-records
Draft

loganj wants to merge 2 commits into
agents-link-runningfrom
agents-link-records

Conversation

@loganj

@loganj loganj commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

🤖 This is step 9 of the Manager/Runner split for agents. It is an inert refactor: the Agents screens show and save the same settings as before.

Summary

The app splits its agent code into two parts. The Manager serves the screens and agent management. The Runner runs agents and owns their saved state. They talk over a link that carries only JSON, so the Runner can later move to a hidden page.

Each agent has a saved record: its settings, what it pays attention to, and its timers. The Runner owns these records. Until now the Manager read and changed them with direct calls. Now:

  • The Manager reads records from what the Runner sends over the link.
  • Each change the screens make goes to the Runner as a link command. It settles once the Runner has saved it and the Manager shows it.
  • The Runner itself forgets the records of agents that are gone.

Details

  • A new agent's settings. Until the Runner sends a record for an agent, the Manager shows its type's defaults. It builds them once, so they keep their identity, as the Runner's own copy did.
  • Stable records. The Manager keeps each record object until the Runner sends a change to that record, so screens do not re-render for nothing.
  • Forgetting gone records. The Runner now removes records that no membership keeps. Before, the Manager did this after each read of the agent list. The Manager's memberships now say whether native's agent list has been read. The Runner forgets only from a read list, and only when the list changed, so a list sent before the first read can never empty the records.
  • Ordering. An edit's result arrives after the record change it caused, because the link sends a changed value before the command's promise settles. A new link test pins this.
  • Still direct, moved in the next slice: the provider change (retype). It changes a record with a function inside the Runner's per-agent gate, so it becomes one Runner command, together with session controls.

Tests

  • New link tests: records are shown and keep their identity, an edit settles once it is shown, defaults are shown until a record arrives, and a membership outside the agent's home community gets its own attention with the agent's config.
  • New Runner test: an unread empty list forgets nothing, and a read list forgets the gone record in storage. It fails without the read-list guard.
  • The full unit suite passes locally (11,970 tests). The only failures are the known emoji, status-editor and avatar-picker tests that always fail in this worktree.

🤖 Generated with Claude Code

loganj and others added 2 commits October 28, 2026 12:53
The Manager now reads agent records from what the Runner sends over the
link, and asks the Runner for each edit as a link command. An edit
settles once the Runner saved it and the Manager shows it. A new agent
shows its type's defaults until the Runner sends a record for it, and an
unchanged record keeps its identity.

The Runner, which owns records, now forgets those no membership keeps
itself, once the Manager has sent a full list it has not forgotten by
before. A list sent before native's list is read forgets nothing.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
The owner save now answers over the Runner link, so the queued write
can be refused before the save resolves. Attach the expectation first
so the refusal is never briefly unhandled.

Co-authored-by: Larry <627498bd4bd1f281a16431e3c6cce3b5c25b6692798c78672298aefbf2f8f8b5@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Logan Johnson <loganj@squareup.com>
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