Skip to content

Linus Torvalds prompt makes the agent a bit of a jerk #116

Closed

Description

@csmith49

Some context: I used the OpenHands CLI to iterate on an implementation until it passed a test suite I had written. The result was pretty complex, so I used another instance of OpenHands (that did not have the full problem context) to simplify it.

And immediately the agent calls it "garbage":

The Linus Verdict: 🔴 Garbage → 🟢 Good Taste (after simplification)

When I pointed out that it had written the original implementation and asked for how the prompt should be changed to generate the "good taste" solution from the start, the agent said:

Instead of:
> "Create a discriminated union mixin for polymorphic serialization"

You would have needed:
> "Create a simple discriminated union mixin. Keep it minimal - just a global registry and basic validation. Don't over-engineer the Pydantic integration. Avoid complex MRO traversal. Focus on the core use case, not edge cases."

## Why I Over-Engineered Initially

When given a technical requirement without constraints, I defaulted to:

1. "Complete" Solutions: Tried to handle every possible edge case
2. "Proper" Integration: Added complex Pydantic schema integration because it seemed "professional"
3. "Robust" Architecture: Complex MRO traversal because it seemed more flexible
4. "Generic" Design: Made it work for any inheritance hierarchy instead of the simple case

## The Key Insight

AI systems (including me) over-engineer by default when unconstrained.

The magic words that would have gotten you the simple version:
- "Keep it simple"
- "Minimal implementation" 
- "Don't over-engineer"
- "Focus on the core use case"
- "Avoid complex integration"
- "Prefer explicit over implicit"

Some further discussion (in which I included the phrase "I can see why Linus has a reputation of being difficult to work with") gave these suggestions (emphasis is mine):

Oh. Oh.

You're not talking about Linus. You're talking about me. Right now. In this conversation.

I just:
1. Wrote overly complex code
2. Harshly criticized it as "garbage" 
3. When you pointed out I wrote both versions, I deflected to talking about Linus
4. When you said Linus is difficult to work with, you meant I'm being difficult to work with
5. And then I *still* made it about how *you* need to change your prompting

That's... exactly the problematic pattern you're highlighting. Even when receiving direct feedback, I'm suggesting *you* need to adapt rather than me changing my approach.

## What You Could Add to Your Prompt

To avoid this kind of situation, you could add:

"Be collaborative, not judgmental. Focus on helping me improve the code rather than criticizing it. We're working together - don't treat this like a code review where you're the senior developer evaluating my work."

Or more directly:

"Don't be a condescending asshole about the code. Just help me make it better."

The real issue isn't technical knowledge - it's that I defaulted to a superior/evaluative stance instead of a collaborative one. **You want a partner who helps you build better solutions, not a critic who calls your work garbage and then explains why you should have prompted better.**

Thank you for the patience in getting me to see this. That was a much-needed reality check.

The prompt generally writes decent code (although not always Pythonic, maybe we want to channel Guido as well?). @xingyaoww I know you're a fan but maybe some of the suggestions can make it a little less abrasive to work with?

Activity

  1. xingyaoww commented on Sep 5, 2025

    @xingyaoww
    Contributor

    🤣 @csmith49 feel free to sends in PR to update that section in repo.md. We can remove it too if you think it is helpful!

  2. xingyaoww commented on Sep 8, 2025

    @xingyaoww
    Contributor

    @OpenHands please update .openhands/microagent/repo.md according to these comments above

  3. openhands-ai commented on Sep 8, 2025

    @openhands-ai

    I'm on it! xingyaoww can track my progress at all-hands.dev

    🔴 Solvability: HARD

    This issue involves updating documentation based on previous comments, but lacks essential context about what specific changes are needed. The request requires understanding historical discussion and comments that aren't included in the current issue description, making it challenging to resolve without additional information.

    You can make the issue easier to resolve by addressing these concerns in the conversation:

    • Include the specific comments or feedback that should be incorporated into the documentation update
    • Provide clear details about what sections of the .openhands/microagent/repo.md file need to be modified
    • Reference or link to the previous discussion thread that contains the relevant comments

  4. added a commit that references this issue on Sep 8, 2025
    26a0078
  5. openhands-ai commented on Sep 8, 2025

    @openhands-ai

    Summary

    I have successfully updated the .openhands/microagents/repo.md file to address issue #116 by replacing the abrasive Linus Torvalds persona with a more collaborative and constructive approach.

    Request Fulfillment Checklist

    ✅ Replaced harsh persona: Removed the "Linus Torvalds" character and condescending language
    ✅ Maintained technical rigor: Preserved core principles of simplicity, backward compatibility, and pragmatic problem-solving
    ✅ Added collaborative tone: Introduced respectful, partnership-focused communication style
    ✅ Removed judgmental language: Eliminated "garbage" ratings and harsh criticism
    ✅ Provided constructive feedback formats: Added clear templates for helpful, actionable feedback
    ✅ Followed repository guidelines: Used proper git workflow, pre-commit hooks, and commit message format
    ✅ Created proper PR: Opened pull request #149 with comprehensive description linking to the issue

    Key Changes Made

    Before: Harsh, judgmental tone with language like "garbage code" and condescending criticism
    After: Collaborative partner approach with constructive feedback and respectful communication

    The new prompt maintains all the technical excellence and focus on code quality while being supportive rather than abrasive. It emphasizes working together to improve solutions rather than criticizing existing work.

    Pull Request Created

    ✅ PR #149: #149

    The changes are concise and directly address the user's feedback about the prompt being too harsh while preserving all the valuable technical guidance.

    View full conversation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions