Repository: harbor-framework/harbor
Issue: E2B sandbox timeout is not configurable
Root cause: Architectural Constraint

## Summary

The E2B environment has a hardcoded sandbox timeout of 86,400 seconds (24 hours), which exceeds E2B's maximum allowed timeout of 1 hour (3,600 seconds) for free/hobby tier accounts. This causes E2B trials to fail immediately with a `400` error for free tier users, with no way to override the value.

## Error

```
e2b.exceptions.SandboxException: 400: Timeout cannot be greater than 1 hours
```

Full traceback:

```python
File "harbor/environments/e2b.py", line XXX, in _create_sandbox
    self._sandbox = await AsyncSandbox.create(
        template=self._template_name,
        metadata=metadata,
        timeout=86_400,  # ← Hardcoded value
    )
...
File "e2b/sandbox_async/sandbox_api.py", line 183, in _create_sandbox
    raise handle_api_exception(res)
e2b.exceptions.SandboxException: 400: Timeout cannot be greater than 1 hours
```

## Root Cause

In `src/harbor/environments/e2b.py`, the timeout is hardcoded:

```python
self._sandbox = await AsyncSandbox.create(
    template=self._template_name,
    metadata=metadata,
    timeout=86_400,  # 24 hours - exceeds E2B free tier limit
)
```

## Proposed Fix

Make the sandbox timeout configurable via environment kwargs, keeping the existing default:

```python
def __init__(
    self,
    environment_dir: Path,
    environment_name: str,
    session_id: str,
    trial_paths: TrialPaths,
    task_env_config: EnvironmentConfig,
    *args,
    sandbox_timeout: int = 86_400,  # Keep existing 24-hour default
    **kwargs,
):
    super().__init__(...)
    self._sandbox_timeout = int(sandbox_timeout)

async def _create_sandbox(self):
    ...
    self._sandbox = await AsyncSandbox.create(
        template=self._template_name,
        metadata=metadata,
        timeout=self._sandbox_timeout,
    )
```

This allows free tier users to configure the timeout via CLI:

```bash
harbor trials start ... \
    --environment-type e2b \
    --environment-kwarg sandbox_timeout=3600
```

Paid tier users continue to work unchanged with the 24-hour default.

## Impact

- **Severity**: Medium - E2B environments are broken for free tier users
- **Affected versions**: All versions with E2B support
- **Workaround**: None without patching the source
- **Breaking changes**: None - default behavior unchanged

## Additional Context

- E2B free tier limit: 1 hour (3,600 seconds)
- E2B paid tiers have higher limits, so keeping 24-hour default preserves existing behavior
- The `int()` conversion handles string values from CLI kwargs (since `parse_kwargs` in `trials.py` returns strings)
- This follows the existing pattern used by GKE (`project_id`, `cloud_build_machine_type`) and Daytona (`snapshot_template_name`) environments



Hi, I met the same requirement so very thank your pr.

But how about set timeout dynamically? Such as set timeout=T1 in setup and set timeout=T2 in execution. There are some variables that may helpful for set timeout:
- `Trial._agent_timeout_sec`
- `Trial._verifier_timeout_sec`
- `Trial._agent_setup_timeout_sec`
- `Trial._environment_build_timeout_sec`

IMHO compared with current implement, this can control life cycle of sandbox more precisely.

Anyway your implement is good enough. I just give a small suggestion.