Techniques are used for adaptation of drug-administration parameters that control insulin delivery in a blood glucose control system. One technique provides relatively long-term adaptation of a nominal basal infusion rate around which the infusion of basal insulin is automatically modulated. This technique enables the system to adapt to longer-term changes in a patient's needs such as may arise from growth, illness, hormonal fluctuations, physical activity, aging, etc. Another technique provides similar adaptation of the size of priming doses of insulin provided at mealtimes, offering the potential of overall better glycemic control in individuals and also providing the adaptation to longer-term changes in a patient's needs. Both techniques may employ adaptation calculations using a receding-horizon window of recent values of the adapted parameter. The system may also deliver doses of a counter-regulatory agent (e.g., glucagon) to the subject in response to information about estimated accumulation of exogenously infused insulin (either subcutaneously, intramuscularly, intraperitoneally, or intravenously) and/or the effect that insulin might have on glucose levels (either blood glucose concentration or interstitial fluid glucose concentration).