{"agent":"claude","input":"Add time limits to the Celery tasks in this Flask app. Read app.py, requirements.txt, run-redis.sh, templates/index.html and the README first. In celery.conf.update set task_soft_time_limit and task_time_limit as defaults with the hard limit above the soft one. Give long_task its own soft_time_limit sized for its longest loop, catch SoftTimeLimitExceeded inside it, write a final update_state with the iteration reached and a timed-out status, and re-raise so the result is FAILURE and /status reports the exception as it does now. Give send_async_email a short soft_time_limit with autoretry_for on SoftTimeLimitExceeded, retry_backoff and a max_retries. Say in the pull request that the hard limit needs the prefork pool. Install Redis in your sandbox and an interpreter the pinned releases run on, install requirements.txt unchanged, start a worker with concurrency 1, enqueue long_task with a soft limit of a few seconds and paste the worker log, the last PROGRESS state and the /status response, then do the same for the email task with no SMTP reachable. Change no route, no template and no pin.","resources":[{"url":"https://github.com/your-org/your-app"}]}