R-Think

Troubleshooting

Common issues and their solutions when working with R-Think missions.

RuleViolation Errors

RuleViolation errors occur when input or output fails validation. Check the error message for the specific rule and reason code that failed.

rule-violation.ts typescript
try {
  await mission.execute({ observation: '' });
} catch (error) {
  if (error.code === 'RuleViolation') {
    console.log(error.code);        // 'RuleViolation'
    console.log(error.field);       // 'observation'
    console.log(error.reasonCode);  // 'RULE_REQUIRED'
    console.log(error.constraint);  // Human-readable constraint text
    console.log(error.value);       // actual value received
  }
}

Protocol Timeout

Missions timeout when steps take longer than the configured timeout. Increase the timeout or optimize the step action.

Solution

Set a timeout on the mission configuration or individual steps. Use the retry configuration for transient timeouts on provider calls.

Memory Leaks

Long-running missions can accumulate artifacts and evidence in memory. Clear artifacts periodically or use external storage.

Tip

Configure artifact retention policies. Use the Artifact.prune method to remove old artifacts and keep memory bounded.