Steps to reproduce
- Make the agent process die at startup without submitting a report, in a way that still prints one
assistant line. For example, with subscription auth supplied only by user-scope settings while the native OAuth session is expired: dstack spawns claude with --setting-sources project,local (agent.py:356-357), which excludes the user scope, so the agent starts and dies immediately.
- Start any preset creation:
dstack apply -f preset.dstack.yml -y.
Actual behaviour
Agent process exited without a report; resuming in 30s.
repeats every 30 seconds, indefinitely, before any instance is provisioned. Never 60s or 120s: agent.py:551-552 sets made_progress on any assistant line without inspecting its content, and agent.py:238-239 resets the retry budget (agent.py:52) before the pop at agent.py:246, so the budget never drains and the while True at agent.py:216 has no attempt cap. The agent's own error is captured at agent.py:555-556 but the loop message omits it, so the cause is only visible in .agent-stdout.jsonl. A report-less death that prints no assistant line does bound correctly and exits after 30/60/120s.
Expected behaviour
The creation fails immediately, printing the agent's error:
Failed to authenticate: OAuth session expired and could not be refreshed
Retries stay only for a transient death after real progress, bounded, printing the error each attempt.
Steps to reproduce
assistantline. For example, with subscription auth supplied only by user-scope settings while the native OAuth session is expired: dstack spawnsclaudewith--setting-sources project,local(agent.py:356-357), which excludes the user scope, so the agent starts and dies immediately.dstack apply -f preset.dstack.yml -y.Actual behaviour
repeats every 30 seconds, indefinitely, before any instance is provisioned. Never 60s or 120s:
agent.py:551-552setsmade_progresson anyassistantline without inspecting its content, andagent.py:238-239resets the retry budget (agent.py:52) before the pop atagent.py:246, so the budget never drains and thewhile Trueatagent.py:216has no attempt cap. The agent's own error is captured atagent.py:555-556but the loop message omits it, so the cause is only visible in.agent-stdout.jsonl. A report-less death that prints noassistantline does bound correctly and exits after 30/60/120s.Expected behaviour
The creation fails immediately, printing the agent's error:
Retries stay only for a transient death after real progress, bounded, printing the error each attempt.