Repository navigation
fix: propagate asset tool exit codes and suppress decorative headers - #29
Merged
REX-codebase merged 1 commit intoJul 18, 2026
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.
Context
In our current orchestration flow, the orchestrator layer fails to monitor sub-process exit codes from spawned asset tools. This lack of error propagation often causes the system to report false successes, misleading upstream agents into generating "slop" placeholders or dummy layouts when asset discovery fails.
Furthermore, decorative ASCII headers outputted during failures and standard operations contaminate stdout, corrupting the stream when structured output (
--json) is requested by automated tools.This Pull Request implements the Robust Signal Patch to address these issues by ensuring reliable error propagation and guaranteeing strictly machine-readable JSON outputs.
Key Changes
1. Orchestrator Integrity & Failure Propagation (
skills/vg-os/cli.js)search) and cognitive commands (task) withspawnSyncto ensure the orchestrator waits for execution to finish.cli.jsto prevent human-readable interactive logs from executing before search spawning when the--jsonflag is provided.2. Header Suppression & JSON Safeguards (
skills/utils/search.js)if (!isJson)blocks to prevent stream contamination when automated tools request JSON payloads.--jsonflag.--jsonis active, errors are written directly to stdout as a single JSON object containing the error message ({"error": "<specific error description>"}), bypassing standard ASCII help screens and exiting with status1.Rationale: The "Why"
Exposing clear, unpolluted failure signals prevents agents from assuming an execution succeeded when it actually crashed.
Verification & Acceptance Criteria
--jsonis enabled.{"error": "..."}) even during tool failures.