Skip to content

Persist reverse-attach grants across oab-instance-mcp restarts #12

Description

@chaodu-agent

Today grants live in AttachManager's memory. Every restart of the daemon (deploy, crash, logout) drops them and the human has to lend again from Connect/Remote — hit twice on 2026-09-26 while deploying 0.6.0 (#10 comment).

Proposal: persist {id, runtime, session, profile, principal, expires_at} in UserDefaults and the attach secret in the Keychain (service dev.openab.instance-mcp.grant, account = grant id); on start, re-create the ReverseAttachClient for every grant whose expires_at is in the future and let its normal redial policy run (a pod that was replaced meanwhile answers 401 → grant ends, as designed). Revocation deletes both records.

Acceptance: lend → launchctl kickstart -k the agent → within one backoff the pod shows attached=true again with no human action; GET /attach lists the same grant id.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions