Awesome Reviewers

When using AgentCore Runtime for long-running/async jobs, manage concurrency by relying on the runtime’s status mechanisms rather than blocking or implementing unbounded wait loops. Clients should start the async job, return immediately, and then use the provided status API/methods or the /ping health signal to determine progress.

Apply this standard:

Example pattern (pseudo-Python):

# 1) Kick off async work (returns quickly)
job = runtime.start_async_job(payload)

# 2) Check job state using runtime status (avoid manual tight loops)
while True:
    st = job.status()  # runtime-provided status call
    if st in ("SUCCEEDED", "FAILED"):
        break
    # Optional: sleep/backoff to reduce load
    time.sleep(1)

# 3) If applicable, also interpret /ping
# if ping returns {"status": "HealthyBusy"}, treat as in-progress.