Agent Application DevelopmentAccount
Knowledge catalogChoose core direction and segmented content
Practice 32IntermediateImplementationAbout 12 minutes

Corresponding knowledge: One state machine for retries, deadlines, cancellation, and budgets

How to uniformly design Agent's retry, cancellation, timeout and cost budget?

Incorporate total deadlines, single timeouts, error classification, budget reservations, and collaborative cancellation into the same execution strategy.

Try againCanceltimeoutbudgetasyncio

Knowledge content check2026-10-03 · Check the source of the original question2026-10-02

Knowledge unit directory

LEARN · PRACTICE · REFLECT

Knowledge exercises·Independent answers

My notes and review ↗

Principles and Solutions have been collapsed. Explain the core mechanism, boundaries and verification methods in your own words, and then compare them.

Answers and personal notes

Each modified commit will be kept as an independent history. Your level of mastery is up to you to evaluate yourself against the standards.

Explain in your own words first

The core principles, analysis, Q&A and migration cases have been closed. When you are ready, unfold it and compare it with the content to find any omissions.

Hands-on verificationComplete on demand · Suggestions15 minutes

Write processing matrices for model throttling, permission denial, and tool timeouts.

Expand acceptance requirements and checkpoints
  • Do not blindly retry permission denials
  • Retries do not reset total deadline
  • No new action will be started after cancellation

Key inspections

  • Able to distinguish temporary errors, permanent errors and unknown results
  • Ability to limit both single execution and complete task time
  • Can explain the propagation of cancellations and the processing of operations that have occurred
  • Can explain why budget reservation for concurrent calls requires atomicity