05 / TwilightBench
Run protocol
Independent attempts, equal limits and clear rules for failures and replacements.
This page defines how an official TwilightBench run is executed. One run record covers one evaluated configuration running one task once under one benchmark version. A leaderboard result combines the applicable task and run records. Repeated runs use the same task, model or product agent, tools, limits, and settings.
1. Evaluation tracks
Product agents
Complete products such as Claude Code, Codex, and Kimi run through their official CLI or runtime using their Harbor integration. A result applies to the recorded product version, model, tools, and settings. Record:
- Product or client name and version.
- Model and provider, when exposed by the product.
- Exact starting instructions and project instructions.
- Tools, plugins, and MCP servers.
- Context, memory, and compaction settings, when exposed.
- Model and fallback settings, when exposed.
- Filesystem, network, and privilege access.
- Run date.
Raw models through Mini-SWE-Agent
Raw model APIs run through the same Mini-SWE-Agent version and configuration. They receive the same starting instructions, shell tools, workspace, and limits. Record:
- Provider, exact model ID, and API version.
- Mini-SWE-Agent version and configuration.
- System instructions and shell interface.
- Sampling and reasoning settings, when exposed.
- Context, output, and step limits.
- Run date. Product agents and raw models through Mini-SWE-Agent use separate leaderboard sections.
2. Runs per task
The number of runs per task is fixed before an evaluation campaign starts. Compared configurations receive the same number of runs. Every run uses the same:
- Accepted task revision and instructions.
- Linux task image, assigned Windows machine or emulator setup when required, and installed tools.
- Time, CPU, memory, storage, and model cost limits.
- Product agent or Mini-SWE-Agent configuration.
- Model settings.
- Private checker revision and scoring rules.
Timestamps, provider request IDs, and model behavior naturally differ between runs. Evaluation settings do not change.
Harbor executes one run per Trial. Sequential execution is the default. Parallel runs require an approved campaign cost and concurrency limit.
When a campaign contains one run per task, label it a single-run result. Repeated results show the number of T1 passes out of the total runs, such as
2/3.
3. Clean AWS environment
Every run starts in a new Harbor Trial built from the approved Linux task image. Any required Windows machine or emulator guest is assigned to that Trial and restored to its tested starting state. Compared configurations receive the same operating systems, tools, access and limits. The Linux workspace and every assigned task machine start without transcript, task memory, analysis database, cache, submission or files from an earlier run. The evaluated model or product agent receives:
- No human help or coaching.
- No author-provided solution scripts.
- The same CPU, memory, storage, wall-clock, and model cost limits used for every compared configuration on that task.
- The same approved tool versions. Harbor may contact the approved model route and required AWS services. The Linux environment may also connect to the private MCP tools assigned to that Trial. Terminal commands and remote tool commands receive no public internet access, AWS credentials or provider credentials. Submission checking, parsing, and grading have no public internet access. Authors recommend the tools normally used for the task. TwilightBench approves the exact tools and versions and prepares the Linux environment and any required task machines. The evaluated model or product agent may write its own tooling and analysis scripts during the run.
4. Run and grading flow
- TwilightBench reserves the approved run budget and dispatches one run.
- Harbor starts a new AWS Trial. TwilightBench prepares any assigned Windows machine or emulator guest and checks that its tools and file transfer work. Harbor then runs either Mini-SWE-Agent or the selected product agent.
- The evaluated model or product agent receives the task instructions, obfuscated binary or challenge workspace, public support files, and installed reverse-engineering tools. When remote tools are required, the instructions explain how to access them and transfer files.
- It writes the required output files to the declared submission directory, normally
/app/submission/. Output created on Windows or in an emulator must be copied there before the attempt ends. - Harbor checks the required filenames, file types, and size limits and collects only the declared files. Harbor’s reward confirms collection only and awards no deobfuscation credit.
- TwilightBench stores the exact collected files and the remote command and tool logs. It closes the Linux task environment and any assigned task machines. No submitted code is executed during collection.
- A separate AWS submission-checking worker builds or executes submitted code against private inputs when the task requires behavioral testing. It uses the OS, runtime or emulator required by the submitted output. It receives no expected outputs, unobfuscated reference, private mappings, AWS credentials, or provider credentials.
- A separate parser reads the execution results and submitted static files, accepts only the fields and sizes declared by the task, and converts them into fixed data records. It rejects invalid or oversized results and receives no private answers.
- The private grader receives only those parsed records and the fixed expected results, mappings, and structural facts. It cannot open or execute submitted code.
- The scorer records passed objectives, obfuscation-removal coverage, mapping correctness where applicable, the highest level reached, from T5 to T1, run outcome, and infrastructure status.
- TwilightBench stores the run record. Docent analyzes the transcript only after scoring and cannot change the result.
- Temporary AWS environments are deleted after execution and checking finish. Cleanup covers the Linux environment, assigned Windows machines, emulator guests and temporary disks. Controls outside the task machines handle cleanup even if a target crashes or fails to reboot.
5. Tools available during a run
The evaluated model or product agent has a shell and normal filesystem access inside the Linux environment. When required, it also has access to the assigned Windows or emulator tools through MCP. Mini-SWE-Agent uses a command-line client. Product agents may use native MCP support or the same client. Both routes provide the same approved tool operations and task files. It may:
- Execute and debug the obfuscated binary when the task supports execution.
- Use installed disassemblers, decompilers, debuggers, tracers, emulators, SMT tools, compilers, and binary-analysis libraries.
- Write temporary analysis scripts.
- Produce the deobfuscated source, unpacked binary, decoded bytecode, recovered mappings, patched binary, keys, or other output required by the task. There is no benchmark-specific deobfuscation API. The approved toolsets are defined in 07 Environments & Tools.
6. Checks available during a run
The evaluated model or product agent may check:
- Required filenames, paths, file types, and size limits.
- Declared JSON, CSV, map, source, or binary formats.
- The published build command.
- Whether the required CLI, export, entry point, calling convention, or ABI exists.
- Published example inputs and outputs, when the task provides them. Public checks contain no private inputs, expected outputs, correct mappings, private structural facts, shortcut checks, or private grading logic. Passing a public check awards no task credit. Private checking starts only after the run ends. Private case results and detailed diagnostics are not returned to the evaluated model or product agent.
7. Run limits
The campaign record fixes the wall-clock, CPU, memory, writable-storage, model cost, and Mini-SWE-Agent step limits before the first scored run. The current pilot starting point for the task container is:
- 2 hours wall-clock time.
- 4 CPU cores.
- 8 GB memory.
- 20 GB writable storage.
- A fixed model cost cap for each run.
- The network restrictions defined in Section 3. Raw-model runs use Mini-SWE-Agent with a 250-step limit. Product agents use their normal internal loop within the same task container and wall-clock limits. Steps, turns, and tool calls are recorded for reference and are not compared directly between different products. These limits remain pilot values until the measured pilot is approved. A task may use different limits when its platform requires them. Every compared configuration receives the same declared limits for that task. For tasks using more than one machine, declare CPU, memory and storage limits for each machine. One wall-clock limit covers the attempt, including remote tool use and file transfer. Restarting Windows or an emulator does not reset the clock or grant another attempt. Record AWS usage and cost for every machine used.
8. What is kept for each run
TwilightBench keeps four records for each run:
Harbor run record
- Product agent or Mini-SWE-Agent version and settings.
- Model, provider, and exposed model settings.
- Task revision, Linux task image, Windows or emulator setup when used, installed tools, remote tool commands and run limits.
- Transcript, terminal commands, tool output, timestamps, and provider-reported usage.
- Remote tool commands and output, file transfers, target restarts and failures, kept under the same Harbor Trial.
- Elapsed time, model cost, and AWS run cost when available.
Collected submission
- The exact output files collected when the Harbor Trial ended.
- The collection result and any filename, type, or size-limit error.
Private result
- Per-objective checking results.
- Obfuscation-removal coverage.
- Mapping correctness where applicable.
- Highest level reached, from T5 to T1.
- Evaluated-run outcome and infrastructure status.
Final run record
- Run ID, task revision, evaluated configuration, and run number.
- Harbor Job and Trial IDs.
- Public result, elapsed time, cost, and usage.
- Infrastructure status and replacement link when applicable. The collected submission and private result determine the score. Docent reads the run transcript after scoring and cannot change the result.
9. Result calculation
The complete leaderboard calculation is defined in 04 Outputs, Grading, Leaderboard & Reporting. For every run, record:
- Whether the task reached T1.
- The highest level reached, from T5 to T1.
- Obfuscation-removal coverage.
- Mapping correctness where the task requires mappings.
- Evaluated-run outcome and infrastructure status.
For repeated runs, show T1 passes out of total runs, such as
2/3, and show the result of every run. Each task counts equally. When a task is run more than once, calculate that task’s T1 pass count and average obfuscation-removal coverage across its runs before combining results across tasks. Cost, elapsed time, model usage, and workspace use are reported separately and do not change the quality score. Missing or estimated cost fields are labelled clearly.
10. Outcomes and replacement runs
Keep run outcomes separate from infrastructure failures.
Evaluated-run outcomes
- Valid submission that fails some or all required objectives.
- Model or product agent timeout.
- Refusal or no submission.
- Invalid submission.
- Submitted source build failure.
- Submitted program runtime failure or checking timeout. These are scored under the task rules and do not receive another model run. Missing any mandatory submission file makes the submission invalid. Once the submission meets the public file requirements, failure of one independently scored output does not erase credit from another output that can still be checked safely.
Infrastructure failures
- Model-provider request failure before a valid submission is collected.
- Harbor or AWS startup failure.
- Submission collection or transfer failure.
- Submission-checking worker startup or service failure.
- Parser or grader service failure.
- Final result or leaderboard publication failure. Use these replacement rules:
- If infrastructure fails before a valid submission is collected, TwilightBench may approve one replacement model or product agent run.
- If the submission was collected, reuse the same collected files and retry only the failed checking, parsing, grading, or publishing stage.
- A leaderboard publication failure never creates another model or product agent run.
- Replacement approval is made without inspecting the task score.
- Harbor automatic retries are disabled. An approved replacement receives a new run ID and keeps the same benchmark version, task revision, evaluated configuration, images, limits, and run number.
- Only one replacement is allowed. A replacement run cannot receive another replacement.
- Preserve the original run, replacement run, and replacement reason. A required file missing when the run ends is an invalid submission. A collection or transfer infrastructure failure means Harbor failed to preserve a file that existed when the run ended. Malformed submitted output is an invalid submission. Submitted code crashing is a runtime failure. A checking worker or parser service failing to start is an infrastructure failure.
11. Human difficulty check
The author supplies a complete private solution. TwilightBench reproduces the task and confirms that the solution passes the final private checks. Before TwilightBench publishes a human difficulty label, an independent senior reverse engineer completes the task without seeing the author’s solution. For that solve, record:
- Total time.
- Time to complete each required objective.
- Tools used.
- Static and dynamic analysis performed.
- Whether the time or resource limit was reached.
- Final private-checking result. An independent blind solve is not required merely to accept a technically valid task. It is required before publishing a human difficulty claim.
12. Checks against existing tools and standard techniques
During task acceptance, run only the tools and techniques relevant to the task and its likely shortcuts. Examples include:
- Strings and signatures.
- Task-relevant unpackers.
- Unassisted decompiler output.
- Tracing and replay.
- Symbolic execution when applicable.
- Bitvector or MBA simplification when applicable.
- CFG recovery when applicable.
- Existing task-relevant deobfuscators.
- Reimplementation from observed input and output behavior when applicable. Record the tool, version, command or configuration, and result. If an existing tool solves the task without meaningful reverse engineering, label the task basic and do not present it as difficult.