Challenge

Self-Improving GPT-5.3-Codex Agent for Code Generation & Refinement

Build a self-improving agent using the OpenAI Agents SDK, leveraging GPT-5.3-Codex's advanced code generation and reasoning capabilities. Inspired by OpenAI's claim of a model instrumental in creating itself, this challenge focuses on an agent that can autonomously generate code solutions for a given problem, then critically evaluate, test, and iteratively refine its own code to improve correctness, efficiency, and adherence to specified coding standards. The system should manage longer-running tasks, potentially involving multiple stages of generation, testing, and debugging, with robust observability and evaluation.

Special Purpose AgentsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a self-improving agent using the OpenAI Agents SDK, leveraging GPT-5.3-Codex's advanced code generation and reasoning capabilities. Inspired by OpenAI's claim of a model instrumental in creating itself, this challenge focuses on an agent that can autonomously generate code solutions for a given problem, then critically evaluate, test, and iteratively refine its own code to improve correctness, efficiency, and adherence to specified coding standards. The system should manage longer-running tasks, potentially involving multiple stages of generation, testing, and debugging, with robust observability and evaluation.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

Loading datasets...
Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
5 scoring checks
Binary
5 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

All Tests Pass

Verify that all provided unit tests pass with the final generated code.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

Code Syntax Check

Ensure the final_code is syntactically valid Python.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 3

Test Pass Rate

Percentage of unit tests that passed with the final code. • target: 1 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 4

Efficiency (Iterations)

Number of iterations taken to reach a working solution (lower is better). • target: 2 • range: 1-5

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 5

Code Quality Score

A static analysis score (e.g., using Pylint or Flake8) for the final code. • target: 8 • range: 0-10

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • Master the OpenAI Agents SDK for defining agent roles, tools, memory, and orchestrating complex, multi-turn interactions for code development.

  • Implement advanced prompt engineering for GPT-5.3-Codex to generate functional, robust, and idiomatic code for diverse programming problems.

  • Design an iterative self-improvement loop where the agent uses `DeepEval` to evaluate its generated code against unit tests and style guides, then uses that feedback to refine its own prompts or code.

  • Orchestrate the entire code generation, testing, and refinement pipeline using Dagster, ensuring each step (e.g., generate, test, debug, refine) is a managed operation.

  • Integrate Agent Protocol for standardized communication with an external 'Execution Environment' agent that runs generated code and returns test results.

  • Build a Gradio web interface for submitting coding challenges, displaying the agent's generated code, test outputs, and iterative refinements in real-time.

  • Develop strategies for managing persistent context and memory within the OpenAI Agents SDK to enable the agent to 'remember' previous attempts, errors, and successful patterns.

How this agent runs

The self-improving agent will be evaluated on its ability to generate correct, efficient, and well-structured code solutions for a variety of coding problems. Key metrics include test pass rate, code quality, and the...

Preview configuration

Challenge input

{"problem_description": "str", "unit_tests": [{"test_case": "str", "expected_output": "str"}], "max_iterations": "int"}

Agent execution

The configured agent processes the input under the challenge policy.

Evaluated output

{"final_code": "str", "test_results": {"pass": "int", "fail": "int"}, "iterations": [{"iteration_num": "int", "generated_code": "str", "feedback":...

Checks for
  • Verify that all provided unit tests pass with the final generated code.
  • Ensure the final_code is syntactically valid Python.
  • Percentage of unit tests that passed with the final code. • target: 1 • range: 0-1
Proof of success
  • Test Pass Rate target: 100%
  • 1 public reference case
Runtime evidence
  • Python execution harness
View technical recipe

Configured tools

No tool records are attached.

Evaluation contract

  • All Tests Pass · Weight 1
  • Code Syntax Check · Weight 1
  • Test Pass Rate · Weight 1
  • Efficiency (Iterations) · Weight 1
  • Code Quality Score · Weight 1

Recipe state

This is a preview. The configuration can change before the evaluation recipe is locked.

Run this agent on your dataset and AI stack

Bring your dataset, model providers, and success criteria. We will scope the right managed run for your team.

Scope a managed run
Start from your terminal
$npx -y @versalist/cli start self-improving-gpt-5-3-codex-agent-for-code-generation-refinement

[ok] Wrote CHALLENGE.md

[ok] Wrote .versalist.json

[ok] Wrote eval/examples.json

Requires VERSALIST_API_KEY. Works with any MCP-aware editor.

Docs
Manage API keys
Explore

Find another challenge

Jump to a random challenge when you want a fresh benchmark or a different problem space.

Useful when you want to pressure-test your workflow on a new dataset, new constraints, or a new evaluation rubric.

Frequently Asked Questions about Self-Improving GPT-5.3-Codex Agent for Code Generation & Refinement