fix(presets): tell agent the event payload is inline, not an env var#205
Open
enyst wants to merge 2 commits into
Open
fix(presets): tell agent the event payload is inline, not an env var#205enyst wants to merge 2 commits into
enyst wants to merge 2 commits into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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