Repository: harbor-framework/harbor
Issue: fix: three terminal-bench@2.0 tasks repeatedly fail with oracle agent in daytona env
Root cause: External Dependency Breakage

👋 Hey harbor maintainers and contributors, I love the project and Discord community. Keep up the great work!

### TLDR

Using terminal-bench-2 at version a5b64de1851f6180dbc8dc46757890409bed4783, three specific tasks repeatedly fail `harbor run` with harbor version 2f122de46673322aa283d3a23057463973d52a89, oracle agent, and daytona env due to 

- a) failures to get snapshots then 
- b) failures to build container images.

The image build succeed in the local docker environment, so this issue only affects runs in remote envs like daytona. 

### Steps to reproduce

1. Set the `DAYTONA_API_KEY` env var to your API key, which you can get at https://app.daytona.io/dashboard/keys
2. Enable network access for your daytona sandboxes ([docs](https://www.daytona.io/docs/en/network-limits/#tier-based-network-restrictions)) or via the daytona folks ([thread](https://discordapp.com/channels/1360039261361012928/1437233631650119741/1438666844448886915)). 
3. Run the following CLI command with harbor version 2f122de:
```
harbor run -a oracle -d terminal-bench@2.0 -e daytona -n 1 --max-retries 2 \
  -t make-mips-interpreter \
  -t path-tracing-reverse \
  -t write-compressor
```

Versus the same command with `-e docker` succeeds (with and without `--force-build`). For example, the [2025-11-16__21-21-40__2f122de__oracle__docker_n1_force_build](https://github.com/danielzayas/harbor/tree/main/jobs/2025-11-16__21-21-40__2f122de__oracle__docker_n1_force_build) job. 

### Root cause analysis

TLDR is that:

1. Pre-built snapshots do not exist for these three tasks in the Daytona environment
2. When Harbor falls back to building from Dockerfile, the Docker builds fail

Failures to build images:

- `laude-institute/terminal-bench-2/make-doom-for-mips/solution/solve.sh` [line 11536](https://github.com/laude-institute/terminal-bench-2/blob/a5b64de1851f6180dbc8dc46757890409bed4783/make-doom-for-mips/solution/solve.sh#L11536) fails to apply a patch because that file doesn't exist at that path in the Docker build context.
- `path-tracing-reverse` [line 7](https://github.com/laude-institute/terminal-bench-2/blob/a5b64de1851f6180dbc8dc46757890409bed4783/path-tracing-reverse/environment/Dockerfile#L7) fails to compile a C file with a math library dependency linked
- `write-compressor` [line 8](https://github.com/laude-institute/terminal-bench-2/blob/a5b64de1851f6180dbc8dc46757890409bed4783/write-compressor/environment/Dockerfile#L8) fails to compile a C file also. 

Examples of repeatedly failures during runs in daytona with `-n 1`:

- [2025-11-16__22-05-08__2f122de__oracle__daytona_n1](https://github.com/danielzayas/harbor/tree/main/jobs/2025-11-16__22-05-08__2f122de__oracle__daytona_n1)
- [2025-11-15__19-13-39__133719f__oracle__daytona_n1_force_build](https://github.com/danielzayas/harbor/tree/main/jobs/2025-11-15__19-13-39__133719f__oracle__daytona_n1_force_build)
- [2025-11-15__15-12-02__133719f__oracle__daytona](https://github.com/danielzayas/harbor/tree/main/jobs/2025-11-15__15-12-02__133719f__oracle__daytona)

X-posting the hyperlink to the Discord discussion thread about this issue: https://discord.com/channels/1360039261361012928/1418249202089197699/1439873392747745350