altimate-code
altimate-code copied to clipboard
run: wrapper orphans the binary on SIGTERM, agent config keys fold silently, no token budget
Problem
Three gaps make a headless altimate-code run hard to bound and stop from a driver script:
- Killing the wrapper orphans the binary.
bin/altimate-coderuns the compiled binary withspawnSync, which installs no signal handling.kill <wrapper pid>(SIGTERM from a harness,timeout, a CI cancel) ends the Node wrapper and leaves the binary running with no parent. Observed: arunkept working and spending tokens after its driver had killed the wrapper at its budget. - Unknown agent config keys are folded into
optionswithout a word.ConfigAgentV1.normalizecopies every top-level key it does not interpret intooptions. A typo such asbudget: 30forsteps: 30is accepted, does nothing, and leaves no trace in the log. runhas no token budget.--max-turnsand--time-budgetbound turns and wall-clock time, but nothing bounds billed tokens, and task subagent sessions spend outside the root session's turn count.
Expected
- Termination signals sent to the wrapper reach the binary; exit codes stay as they are.
- A folded agent key is at least reported.
- An optional
--max-tokens <n>stops the run (root and task sessions together) and finalizes it the same way--time-budgetdoes. Without the flag nothing changes.
Duplicate of #1653 (opened by mistake; PR #1655 already tracks this).