Skip to content

afx send: <workspace>:architect:<name> does not compose the two working address forms (NOT_FOUND despite registered architect) #1707

Description

@amrmelsayed

Problem

afx send <workspace>:architect:<name> "..." fails with Agent 'architect:<name>' not found in workspace '<workspace>' (NOT_FOUND) even when that workspace has an architect registered under exactly that name. Hit in the field today: a sibling-workspace architect asked to be reached at <ws>:architect:<name>, the target was confirmed registered via /api/overview (three named architects), and the send still NOT_FOUNDed.

The two component features both exist and work:

  • architect:<name> — per-architect addressing within a workspace (Spec 755).
  • <workspace>:<agent> — cross-workspace addressing.

They do not compose.

Root cause

parseAddress() (agent-farm/utils/agent-names.ts) splits on the FIRST colon only, so cloudws:architect:subscription parses as project='cloudws', agent='architect:subscription'. In resolveAgentInRegistry() (tower-messages.ts, and the live resolver takes the same shape):

  • the architect:<name> branch triggers only when project === 'architect', i.e. the two-part local form;
  • with a real workspace prefix, the agent string 'architect:subscription' falls through to the bare-architect check (agent === 'architect' — no) and then the builder lookup (no match) → NOT_FOUND.

Fix shape (hypothesis, for the builder to validate)

In both the live resolver and the registry fallback: after an explicit project: maps to a workspace, if the remaining agent portion starts with architect:, route it through the existing named-architect resolution (resolveRegistryArchitectByName and its live twin) against THAT workspace instead of the sender's.

Constraints:

  • Preserve the Spec 755 spoofing rule. A builder sender may only address its own spawning architect, which is by definition same-workspace, so a builder using the cross-workspace named form should be rejected exactly as a mismatched local architect:<name> is. Architect and other non-builder senders: allowed, mirroring the open sibling-architect grammar.
  • Mailbox-first semantics unchanged: a known-but-offline named architect in an active workspace HOLDs, never drops; a fully-inactive workspace still NOT_FOUNDs.
  • Test matrix: cross-workspace named hit (live), cross-workspace named hit (registry hold), unknown name in target workspace (NOT_FOUND with the name in the message), builder sender rejected (spoofing), local forms unchanged.

Workaround until fixed

afx send <workspace>:architect reaches the architect named main (else the first registered) in the target workspace; ask them to relay locally via afx send architect:<name>.

Activity

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

    area/towerArea: Tower server / agent farm CLI

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions