Skip to content

fix(presets): tell agent the event payload is inline, not an env var#205

Open
enyst wants to merge 2 commits into
OpenHands:mainfrom
enyst:fix/event-payload-prompt-not-env-var
Open

fix(presets): tell agent the event payload is inline, not an env var#205
enyst wants to merge 2 commits into
OpenHands:mainfrom
enyst:fix/event-payload-prompt-not-env-var

Conversation

@enyst

@enyst enyst commented Jun 23, 2026

Copy link
Copy Markdown
Member

HUMAN:
My agent discovered in these logs that $AUTOMATION_EVENT_PAYLOAD was not set in the agent's env. Reference: Slack response

It seems that:

  • the env var is not set
  • the contents is sent in the prompt
  • but the agent is told that the env var is set, so it tries to read it.

This PR proposes to adapt the prompt to stop telling the agent that it exists when it doesn't.

Do we want to set this in env instead, so the agent knows the right thing? (can we? it should be… bash tool’s env)

I'm not sure though! If this PR/issue doesn't smell right, we can just close it.


AGENT:

The Event Payload prompt block previously just embedded the webhook JSON. Agents (especially weaker models) tried to read $AUTOMATION_EVENT_PAYLOAD from their bash tool, where it is not set (it's only exported into the entrypoint process), got an empty value, and hit a JSON parse error — burning turns recovering instead of using the payload already in the prompt.

Make the block explicit: the JSON is provided inline; do not look for a shell env var.

Refs #202

enyst and others added 2 commits June 23, 2026 00:03
The Event Payload prompt block previously just embedded the webhook JSON.
Agents (especially weaker models) tried to read $AUTOMATION_EVENT_PAYLOAD
from their bash tool, where it is not set (it's only exported into the
entrypoint process), got an empty value, and hit a JSON parse error —
burning turns recovering instead of using the payload already in the prompt.

Make the block explicit: the JSON is provided inline; do not look for a
shell env var.

Refs OpenHands#202

Co-authored-by: openhands <openhands@all-hands.dev>
Removed instructions about reading event payload from shell environment variable.
@enyst enyst requested a review from malhotra5 June 23, 2026 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant