ruvnet/ruflo · error · TeammateError

PLAN_NOT_FOUND

PLAN_NOT_FOUND

Error message

Plan not found: ${planId}

What it means

getPlanOrThrow() searched team.activePlans for the given planId and found no match. The plan was never submitted to this team, was completed/archived out of activePlans, or the id is wrong — there is no plan object to operate on.

Source

Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:2133

    }
  }

  private getTeamOrThrow(teamName: string): TeamState {
    const team = this.activeTeams.get(teamName);
    if (!team) {
      throw new TeammateError(
        `Team not found: ${teamName}`,
        TeammateErrorCode.TEAM_NOT_FOUND,
        teamName
      );
    }
    return team;
  }

  private getPlanOrThrow(team: TeamState, planId: string): TeamPlan {
    const plan = team.activePlans.find(p => p.id === planId);
    if (!plan) {
      throw new TeammateError(
        `Plan not found: ${planId}`,
        TeammateErrorCode.PLAN_NOT_FOUND,
        team.name
      );
    }
    return plan;
  }

  private getMailboxPath(teamName: string, teammateId: string): string {
    return path.join(this.teamsDir, teamName, 'mailbox', `${teammateId}.json`);
  }

  private async writeToMailbox(
    teamName: string,
    teammateId: string,
    message: MailboxMessage
  ): Promise<void> {
    // Security: Path validation already done by getMailboxPath via validateName

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Verify the referenced identifier exists before use (list available items and match against user input).
  2. Return a clear 404-style error listing valid identifiers, and have the caller retry with an existing id.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at v3/plugins/teammate-plugin/src/teammate-bridge.ts:2133 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/42025d426ef5ddcd. Report an issue: GitHub.