How do I dig into failed automation runs when the ...
# proj-agent-canvas
h
How do I dig into failed automation runs when the conversation fails to start?
Screenshot 2026-05-18 at 11.05.23 AM.png
l
I'd ask codex or claude code to read the logs that are output by the agent canvas
When you start the agent canvas and pipe the logs to a file so they can be reviewed later.
h
Thank you! Giving it a try
Investigation from agent. Does this make sense for a bug issue @quick-window-91705? Anything else I should include or try first to rule out a local-me-issue?
Copy code
I investigated it.

Findings:

The automation itself is valid and was created successfully.
Its generated tarball uploaded successfully:
tarball_path: <oh-internal://uploads/1671cb7d-f78b-4267-9679-ea250547eda4>
upload status: COMPLETED
The failure happens before your prompt ever runs:
every run has conversation_id: null
every run has sandbox_id: null
UI shows (Conversation not created)
I manually re-dispatched it, and it failed the same way immediately:
status: FAILED
error_detail: "All connection attempts failed"
What that means:

This is not a problem with the git commands in your prompt.
It is not a repo/auth issue against GitHub yet.
It is not a tarball generation issue.
The automation backend is failing when it tries to create the OpenHands conversation/run environment.
Most likely root cause:

There is a local dev networking/config mismatch between the automation service and the agent server/ingress.
In this setup, the automation service appears to be running in a different network context than the agent server/UI, so the URL it uses internally to create conversations is likely wrong/unreachable.
The mixed environment is a clue:
the automation service is reachable from the sandbox at host.docker.internal:18001
but its state/logging indicates host-style paths
that strongly suggests a host-vs-container address mismatch (localhost vs host.docker.internal vs ingress URL)
In short:

The automation is failing because the automation backend cannot connect to the service it needs in order to create a conversation.
Secondary issue:

The 3:00 PM schedule created 3 failed runs at the same timestamp. That suggests a separate scheduler/dispatcher duplication issue, but it is not the primary blocker.
What to check/fix:

Verify the automation backend's configured OpenHands/agent-server base URL.
Make sure it points to a URL reachable from the automation backend process itself.
If the automation backend runs on the host, it likely should use the host-reachable ingress URL, not a container-only hostname.
If it runs in a container, it likely should use host.docker.internal or the proper service hostname, not host-local-only localhost.
Re-test with manual dispatch and confirm runs start getting:
non-null conversation_id
non-null sandbox_id
If you want, I can next help you pinpoint the exact bad base URL/config setting and suggest the concrete fix for this dev stack.
l
Your coding agent should be able to confirm all of those things from the logs I guess
f
I'm actually working on this right now
🙏 1
Basically, the automations run through a BashCommand in the AgentServer - we store both the command and the output from it. But the automation server is not capturing this
Once it is in place, I will update the agent canvas
I think it would make sense to be able to download the output from each run here:
(Maybe by having a download icon next to the Failed or Successful label, or by having the whole item clickable)
The other option, is that if it does start a conversation to be able to click into the conversation
What's your decision here (as PM)?
h
The row should be clickable now to take you to the conversation but that doesn't work if no conversation exists. I'd say short term an extra download button or icon that lets you download the run data is 👍 . Paul can suggest a UI change later as needed 😄
f
One change I did make over the weekend was to update the prompt to be less eager to create a conversation for an automation unless it is actually needed - so it is more likely that some automations will not have a conversation.
ie: If the automation is doing the same thing each time, why create sandboxes and burn tokens?
(Especially if it happens every minute!)
h
Oh interesting. I think most (all?) automations need some readable output. When an automation runs and it doesn't have a conversation would the user then download the log like above or should we make those rows toggleable so there is output visible there?
f
This relates to what I was talking about Friday with Rohit - automations can run anything so in our case, we want:
Copy code
An automation which queries git / slack every minute for new events, and uses a JMESPath filter to determine whether or not to dispatch this to an actual conversation
(If we started a new conversation for each query, we would burn a lot of tokens very quickly)
nod 1
l
Yeah, it'd be great to have a dropdown in the automations page that shows the last agent message or something
f
Already have a conversation running to add that!
🔥 1