Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions openhands/usage/customization/repository.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,23 @@ fi

exit 0
```


## Agent Finish Script

You can add a `.openhands/agent_finish.sh` file, which will run every time the agent finishes a task (i.e., when the agent emits an `AgentFinishAction` / transitions to the `FINISHED` state).

- Runs inside the sandbox/runtime environment
- Runs from the repository root (best-effort via `git rev-parse --show-toplevel`)
- Times out after 10 minutes

For example:

```bash
#!/bin/bash

# Example: write a simple summary marker for downstream automation

echo "OpenHands finished at $(date -Iseconds)" >> .openhands/finish.log
```