Repository navigation
Make workspace bootstrap failures non-blocking and feed errors to agent - #39
Merged
Merged
Conversation
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
workspace-bootstrap.ts): a failed setup/verify command no longer throws and blocks the agent start. The failure is recorded on the agent'sbootstraprecord (status: 'failed'with the command, exit code, output tail, and error) and the run continues.setup.failOnErrorinverted to defaultfalse: the previous throw-on-failure behavior is now the explicit escape hatch — settingsetup.failOnError: truestill fails the whole agent start.verifyCommandfailures follow the same semantics (recorded+non-blocking by default, fail-hard withfailOnError: true; previously verify had no opt-out).opencode/runner.ts):formatBootstrapSummaryBlocknow renders a## Workspace bootstrap failed (host)block — failing command, exit code, error, and output tail — instructing the agent to diagnose and repair the environment as part of the task (without touching.localagent-box/config). Wired into batch/interactive kickoff (session-orchestrator.ts) and the loop INITIAL_PLAN kickoff (loop-run-flow.ts). Skipped-bootstrap prompt behavior is unchanged.docs/repo-config.md):setup.failOnErrordocumented as default-false(record + agent fix attempt) vstrue(fail-hard); setup script andverifyCommandsections updated; post-setup summary section now covers both the ready and failed blocks.Test plan
workspace-bootstrap.test.ts: failingsetup.shis recorded and non-blocking by default; throws only whenenvironment.jsonsetsfailOnError: true; failingsetup.commandrecordsstatus: 'failed', the error message, and output tail, and logs "continuing (the agent will attempt to fix it)".workspace-setup.test.tsto match the new non-blocking/verify semantics.formatBootstrapSummaryBlockfailure-block tests inrunner.test.tscovering the failed-bootstrap prompt block and skipped-state passthrough.npx tsc --noEmitclean; full suite green (136 tests, 0 failures).Created from a Local Agent Box session.
Branch:
bootstrap-failuresBase:
mainCommit:
2a9b1f9Session:
98d7dc39b353Model:
glm-5.3-flash:cloud