Skip to content

bin: add lex-code-bootstrap wrapper; document --max-steps in the README - #155

Merged
alpibrupa merged 1 commit into
mainfrom
fix/bootstrap-max-steps-wrapper
Sep 9, 2026
Merged

bin: add lex-code-bootstrap wrapper; document --max-steps in the README#155
alpibrupa merged 1 commit into
mainfrom
fix/bootstrap-max-steps-wrapper

Conversation

@alpibrupa

Copy link
Copy Markdown
Contributor

Summary

  • 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 step limit exceeded 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.
  • Reproduced live, repeatedly (three separate lex-economy module builds this session): a real multi-module build running 10-20+ minutes across dozens of agent turns hit the panic with --max-steps 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 (everything is env-driven by the file's own design), so there's no main -- separator or "$@" forwarding to get right.
  • Fixed the three bootstrap/run.lex invocation examples in the README's "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.

Test plan

  • 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
  • lex doc-sync --check passes
  • git status scoped to exactly the two intended files

🤖 Generated with Claude Code

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>
@alpibrupa
alpibrupa merged commit 80b455c into main Sep 9, 2026
1 check passed
@alpibrupa
alpibrupa deleted the fix/bootstrap-max-steps-wrapper branch September 9, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant