Skip to content

Goal agents can be provisioned without notfair-goals after a non-throwing registration failure #112

Description

@tongchen92

Source feedback

Misrouted from nowork-studio/notfair-mcp feedback #360 (tracker issue #847). A goal-agent session was instructed to use the NotFair goal-intake lifecycle but notfair-goals was unavailable from tool discovery.

Ground truth

  • The owning implementation is this repository: notfair/src/app/api/mcp/goals/route.ts serves notfair-goals; notfair/src/server/mcp-server/tools.ts exports the lifecycle tools.
  • provisionGoalAgent calls registerGoalsMcpForAgent in notfair/src/server/goals/provision.ts, but treats only thrown exceptions as failures.
  • registerGoalsMcpForAgent returns InstallResult, including { ok: false, error }; that non-throwing failed registration is currently swallowed, leaving a provisioned agent without required goal tools.

Bounded implementation contract

  1. In the goal-agent provisioning/synchronization path, treat a returned failed registerGoalsMcpForAgent result as a failed registration rather than success.
  2. Preserve best-effort behavior for optional browser/catalog MCPs; do not alter credentials, server secret generation, OAuth, or unrelated MCP registrations.
  3. Ensure a safe subsequent provision/synchronization can repair a missing/stale notfair-goals registration.
  4. Add regressions for:
    • returned { ok: false } from goal registration;
    • missing/stale registration repair without real credentials;
    • a tools/list result containing get_goal, log_goal_action, register_pull_request, and log_learning after successful provisioning.
  5. Run focused provisioning/registration/MCP tests and TypeScript typecheck.

Non-goals

  • No eager global tool loading, auth/secret changes, production agent rewrites, or unrelated goal workflow redesign.

Refs nowork-studio/notfair-mcp#847

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmcp-feedbackDurable NotFair MCP tool feedback

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions