Skip to content

run: wrapper orphans the binary on SIGTERM, agent config keys fold silently, no token budget #1656

Closed as not planned

Description

@RaghwendraSingh

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-code runs the compiled binary with spawnSync, 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: a run kept working and spending tokens after its driver had killed the wrapper at its budget.
  • Unknown agent config keys are folded into options without a word. ConfigAgentV1.normalize copies every top-level key it does not interpret into options. A typo such as budget: 30 for steps: 30 is accepted, does nothing, and leaves no trace in the log.
  • run has no token budget. --max-turns and --time-budget bound 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-budget does. Without the flag nothing changes.

Activity

  1. RaghwendraSingh commented on Nov 4, 2026

    @RaghwendraSingh
    Author

    Duplicate of #1653 (opened by mistake; PR #1655 already tracks this).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions