white-morning-89522
10/15/2025, 11:27 PMpre-commit.sh script, which is really helpful, but OpenHands doesn’t seem to run it before creating a pull request unless I tell it to. When I do tell it to run the script, it behaves as intended. I placed the script in .openhands/pre-commit.sh (in the root of my project). Am I doing something wrong?wooden-umbrella-84098
10/16/2025, 3:18 PMgit commit should always run itwooden-umbrella-84098
10/16/2025, 3:19 PM--no-verify thoughwooden-umbrella-84098
10/16/2025, 3:19 PMwhite-morning-89522
10/16/2025, 3:59 PMclaude-sonnet-4-20250514 as the LLM). I didn’t see anything in the logs when setting up the workspace. I also haven’t tried to reproduce the bug.limited-student-10747
10/16/2025, 4:04 PMwhite-morning-89522
10/16/2025, 4:44 PMwhite-morning-89522
10/16/2025, 4:46 PMlimited-student-10747
10/16/2025, 5:06 PMopenhands tag.nutritious-balloon-65098
10/16/2025, 5:06 PMnutritious-balloon-65098
10/16/2025, 5:11 PMopenhands (automatically applied)
• Status: Open
Issue Content:
The issue documents the bug where:
1. Users place a pre-commit script at .openhands/pre-commit.sh in their project
2. OpenHands correctly installs it as a git hook during workspace setup
3. However, the agent doesn't automatically execute this hook when making commits before creating PRs
4. The hook only runs when explicitly instructed by the user
The issue includes:
• Clear description of the problem
• Detailed reproduction steps
• Expected vs actual behavior
• Environment information (GUI interface, claude-sonnet-4-20250514)
• Additional context with possible causes (e.g., agent might be using --no-verify, timing issues)
• References to relevant code locations in the OpenHands codebase
• Impact statement explaining why this matters for users
The issue has been automatically tagged with the openhands label as requested, which means the OpenHands GitHub App will attempt to work on fixing this issue automatically.
No code changes were made in this task - this was purely about documenting and reporting the issue on GitHub.
<sub>View full conversation</sub>