Repository navigation
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| Tasks leave exited boxes | M | needs care | strongest | an agent | 420 (220 code, 200 tests) |
A task box's entrypoint exits with the task's own exit code, and runs with the task's env vars, working directory and args.
Covers:
- BCLI-010
Layers:
- helper:
- crates/minimald/src/env.rs:
run_taskrelays the task's exit code to the helper instead of a fixed failure line; the task's resolved env vars,inherit_cwddirectory and args reach the in-box run - crates/minimald/src/env_min_helper.sh:
min task runexits with the relayed code, not only 0 or 1 cargo nextest run -p minimald task_entrypoint_relays_the_task_exit_codecargo nextest run -p minimald task_entrypoint_carries_env_cwd_and_args
- crates/minimald/src/env.rs:
Split out of T43 (#2405) by the maintainer (2026-11-03). T43's second run ended with no PR: a task box's entrypoint is min task run <task> (mfile::spec::Entrypoint::for_task), which runs through env_min_helper.sh and BoxChannel::run_task in env.rs. The helper returns only 0 or 1, and run_task writes error: sandbox command failed. for any failure (env.rs ~2533). So a task that exits 3 leaves the box with 1. The task's env vars (#585), inherit_cwd and args travel today only on the old TaskRun exec channel, which T43 retires. This task makes the in-box path carry both. T43 then switches the launch to it.
Waits on:
Plan block
### T62 — Relay a task's exit code and inputs through the in-box min helper
slice: S2
kind: task
covers: BCLI-010
size: M
est: 220 code, 200 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: the daemon log names the task and the exit code it relays
observability: none: the task's run span already carries its exit code; this changes only what reaches it
layers:
- helper:
- crates/minimald/src/env.rs: run_task relays the task exit code; env vars, inherit_cwd and args reach the in-box run
- crates/minimald/src/env_min_helper.sh: min task run exits with the relayed code
test: cargo nextest run -p minimald task_entrypoint_relays_the_task_exit_code
test: cargo nextest run -p minimald task_entrypoint_carries_env_cwd_and_args
produces: none
consumes: none
proof: A task box's entrypoint exits with the task's own exit code, with its env vars, working directory and args.
depends on:
- blocked by #2398
Activity
minimal-foundry commentedon Nov 3, 2026
Done. #2971 merged.
branch
agent/2953-relay-a-task-s-exit-code-and-inputs-through-the· epic #2236 · PR #297169023092742797747446664a5b33af32ef8aadd69310fa2dUpdated 2026-11-04T16:24:58.250Z.