Skip to content

Conversation

@enyst
Copy link
Collaborator

@enyst enyst commented Jan 20, 2026

This PR adds a new system_prompt_gpt_5_codex.j2 template tailored for GPT-5 Codex usage within the OpenHands Software Agent SDK.

Key points:

  • Integrates the GPT-5 Codex prompt structure (from gpt-5.2-codex_prompt.md).
  • Adapts it to OpenHands environment by including:
    • OpenHands agent introduction.
    • task_tracker tool usage (replacing Codex's "Plan tool" description where appropriate).
    • apply_patch tool usage description compatible with OpenHands.
    • AGENTS.md spec support.
    • Security policies.
  • Focuses on "Editing constraints", "Frontend tasks", and "Presenting your work" as per the Codex prompt guidelines.

This template is intended for the Codex variant of GPT-5 agent.

@enyst can click here to continue refining the PR


Agent Server images for this PR

GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python amd64, arm64 nikolaik/python-nodejs:python3.12-nodejs22 Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:bd07a39-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-bd07a39-python \
  ghcr.io/openhands/agent-server:bd07a39-python

All tags pushed for this build

ghcr.io/openhands/agent-server:bd07a39-golang-amd64
ghcr.io/openhands/agent-server:bd07a39-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:bd07a39-golang-arm64
ghcr.io/openhands/agent-server:bd07a39-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:bd07a39-java-amd64
ghcr.io/openhands/agent-server:bd07a39-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:bd07a39-java-arm64
ghcr.io/openhands/agent-server:bd07a39-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:bd07a39-python-amd64
ghcr.io/openhands/agent-server:bd07a39-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-amd64
ghcr.io/openhands/agent-server:bd07a39-python-arm64
ghcr.io/openhands/agent-server:bd07a39-nikolaik_s_python-nodejs_tag_python3.12-nodejs22-arm64
ghcr.io/openhands/agent-server:bd07a39-golang
ghcr.io/openhands/agent-server:bd07a39-java
ghcr.io/openhands/agent-server:bd07a39-python

About Multi-Architecture Support

  • Each variant tag (e.g., bd07a39-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., bd07a39-python-amd64) are also available if needed

Copy link
Collaborator

@all-hands-bot all-hands-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found several issues that should be addressed, particularly missing critical guidance sections. Details in inline comments.

* If the changes are in unrelated files, just ignore them and don't revert them.
- Do not amend a commit unless explicitly requested to do so.
- While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
- **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: This template is missing several essential sections that are present in the main system_prompt.j2:

  • VERSION_CONTROL: Git best practices, commit guidelines, handling of git credentials
  • PULL_REQUESTS: Important guidance about not pushing to main, PR management
  • CODE_QUALITY: Clean code principles, minimal changes, import placement
  • EFFICIENCY: Combining actions, using efficient tools
  • FILE_SYSTEM_GUIDELINES: Proper file handling, not creating multiple file versions
  • ROLE: Clarifying the agent's purpose and behavior

While this template includes some git guidance in the "Editing constraints" section (lines 34-41), it's much less comprehensive. Without these sections, the agent may:

  • Push directly to main branch
  • Create inefficient multi-file versions (file_v1.py, file_v2.py, etc.)
  • Make overly defensive code changes
  • Not properly handle git credentials

Recommendation: Either include these sections or document why they're intentionally excluded for GPT-5 Codex. If the intention is that this template extends the base template, that should be clearly documented.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these sections, the agent may:

  • Push directly to main branch
  • Create inefficient multi-file versions (file_v1.py, file_v2.py, etc.)

Claude dear, that’s just you.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants