Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Proactively Save and Utilize Repository Lint, Test, and Typecheck Commands #7302

Open
openhands-agent opened this issue Mar 17, 2025 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@openhands-agent
Copy link
Contributor

What problem or use case are you trying to solve?
Joseph Turian expressed that OpenHands disregards repository-specific instructions for linting, testing, and typechecking commands. Users want OpenHands to identify and save these commands proactively, making them accessible for future use.

Describe the UX of the solution the user wants
Users expect OpenHands to fetch the correct repository lint, test, and typecheck commands automatically during its tasks. Once identified, the commands should be stored to a centralized instruction file (e.g., CLAUDE.md equivalent) for reusability.

User's thoughts on the technical implementation?
The implementation should actively figure out for the repository what the commands are and save them locally to ensure OpenHands runs the correct commands during tasks. By storing these commands, the bot will not need to repeat discovery for subsequent runs.

Describe the alternatives considered
No alternatives were mentioned.

Additional context
Link to Discussion in Slack: https://openhands-ai.slack.com/archives/C06PB3T5ZK6/p1742050612993049?thread_ts=1742050612.993049&cid=C06PB3T5ZK6

Issue Created By: Joseph Turian on Slack

@turian
Copy link
Contributor

turian commented Mar 17, 2025

@enyst

@mamoodi mamoodi added the enhancement New feature or request label Mar 17, 2025
@AutoLTX
Copy link
Contributor

AutoLTX commented Mar 22, 2025

Do we have the plan to really execute the command (something like npm run lint/pylint/some predefined commands in pre-commit) and send the result to openhands, and asking openhands to fix the things automatically? I'd like to pick these part of work if possible.

Currently it seems just asking the LLM to follow some lint pattern's behavior is less than really do the checking process and ask it again to fix the error.(At least from my own experience)

@xingyaoww Will your PR cover these part of work? Do you think it's worth doing?

@enyst
Copy link
Collaborator

enyst commented Mar 22, 2025

We have an enable_auto_lint setting, false by default, but can be set to true. The thing is it seems we are only using it for the LLM-based "draft" edit, not the regular edit:

if self.config.sandbox.enable_auto_lint:

In general, I think it's fair to say that most of the time, we are trying to give the LLM enough information or give it enough ability and guidance to get itself enough information, to do the stuff itself. We usually don't use hardcoded workflows.

Usually doesn't mean quite always, e.g. there are things we do for the agent at its beginning and end in the resolver. But that's not during the agent execution; the agent is in charge.

I do see why linting feels like it could be the exception... but I'm not sure of the implications. 🤔

@neubig neubig added this to the 2025-03 milestone Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants