bin: add lex-code-bootstrap wrapper; document --max-steps in the README - #155
Merged
Conversation
bin/lex-code already solves this for the TUI: the VM's default step budget (10,000,000, a DoS guard for untrusted sandboxed snippets) kills a long agentic session with a step-limit-exceeded panic once enough turns or verbose-enough model output accumulate. bootstrap/run.lex -- build/test/verify pipelines against a real task -- is exactly the same "trusted, long-running orchestration" case, but had no wrapper of its own, so the flag had to be remembered by hand every time `lex run` was typed directly against it. Reproduced live, repeatedly: real multi-module builds running 10-20+ minutes across dozens of agent turns hit the panic with the flag omitted, discarding that whole run's output (bootstrap/run.lex only prints per-step output after the graph run returns, so a mid-run panic loses everything, not just the final result). Added bin/lex-code-bootstrap, mirroring bin/lex-code's own defaults and env-var overrides (LEX_CODE_EFFECTS, LEX_CODE_MAX_STEPS). Simpler than bin/lex-code: bootstrap/run.lex's main takes no positional args (every input is env-driven -- LEX_TASK/LEX_TASK_SPEC/LEX_PIPELINE/LEX_PROVIDER -- by the file's own design, so there's no `main --` separator or "$@" forwarding to get right). Also fixed the three `bootstrap/run.lex` invocation examples in the README's own "Bootstrap Script" section, which was missing --max-steps even though the Quickstart and semantic-search sections both already document it for their own entry points -- the exact gap that led to this session hitting the crash three times before finding the root cause. Verified live: ran the wrapper against the repo's own zip demo task (LEX_PIPELINE=build) in a throwaway worktree, produced a correct, lex-check-clean src/list.lex. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bin/lex-codealready solves this for the TUI: the VM's default step budget (10,000,000, a DoS guard for untrusted sandboxed snippets) kills a long agentic session withstep limit exceededonce enough turns or verbose-enough model output accumulate.bootstrap/run.lex— build/test/verify pipelines against a real task — is exactly the same "trusted, long-running orchestration" case, but had no wrapper of its own.lex-economymodule builds this session): a real multi-module build running 10-20+ minutes across dozens of agent turns hit the panic with--max-stepsomitted, discarding that whole run's output —bootstrap/run.lexonly prints per-step output after the graph run returns, so a mid-run panic loses everything, not just the final result.bin/lex-code-bootstrap, mirroringbin/lex-code's own defaults and env-var overrides (LEX_CODE_EFFECTS,LEX_CODE_MAX_STEPS). Simpler thanbin/lex-code:bootstrap/run.lex'smaintakes no positional args (everything is env-driven by the file's own design), so there's nomain --separator or"$@"forwarding to get right.bootstrap/run.lexinvocation examples in the README's "Bootstrap Script" section, which was missing--max-stepseven though the Quickstart and semantic-search sections both already document it for their own entry points — the exact gap that led to this session hitting the crash three times before finding the root cause.Test plan
zipdemo task (LEX_PIPELINE=build) in a throwaway worktree — produced a correct,lex check-cleansrc/list.lexlex doc-sync --checkpassesgit statusscoped to exactly the two intended files🤖 Generated with Claude Code