feat(daemon): CLI runner resolves args from pipe JSON#170
Merged
claude-puntlabs merged 2 commits intomainfrom Apr 18, 2026
Merged
feat(daemon): CLI runner resolves args from pipe JSON#170claude-puntlabs merged 2 commits intomainfrom
claude-puntlabs merged 2 commits intomainfrom
Conversation
When call.Args doesn't have a value for a declared arg, the CLI runner falls back to parsing the pipe JSON and extracting the field by name. Planner-provided args take precedence. Enables multi-stage pipelines where Claude produces JSON that a CLI stage consumes as command flags. beadle-vjo
There was a problem hiding this comment.
Pull request overview
Adds support for the daemon’s CLI runner to populate missing command arguments from JSON emitted by the previous pipeline stage (the “pipe”), while keeping planner-provided args authoritative.
Changes:
- Parse
pipeas JSON (best-effort) and use its fields as fallback values for declared CLI args whencall.Argsdoesn’t provide them. - Add runner tests covering pipe-only args, planner override precedence, and invalid JSON handling.
- Update mission/issue tracking JSONL entries related to this work.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/daemon/runner.go | Adds JSON parsing of pipe and uses parsed fields as fallback sources for declared CLI args (plus a placeholder parse in compound mode). |
| internal/daemon/runner_test.go | Adds tests validating arg fallback from pipe, override precedence, and invalid JSON behavior. |
| .ethos/missions.jsonl | Records additional mission runs related to implementing/testing this feature. |
| .beads/issues.jsonl | Adds/updates issue entries related to the feature and release tracking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 824c272. Configure here.
- TODO comment: pipe-derived args bypass ValidateArgs (accepted risk)
- Pre-check: skip JSON parse when pipe doesn't start with '{'
- Remove dead pipeFields parse in runCompound
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
call.Argsdoesn't have a value for a declared arg--name=valueflagsTest plan
go vet ./...cleango test -race -count=1 ./internal/daemon/passesBead: beadle-vjo
Note
Medium Risk
Changes CLI stage argument resolution in the pipeline executor, which can alter subprocess invocation based on prior stage output; incorrect parsing or unexpected fields could change runtime behavior despite best-effort JSON handling and tests.
Overview
Enables hybrid multi-stage pipelines by teaching
CLIRunner.Runto best-effort parse the incomingpipeas JSON and use matching fields as fallback values for declared CLI args when the planner didn’t supply them.Adds unit coverage for pipe-derived args, planner override precedence, and graceful handling when the pipe is not valid JSON. Also updates tracked
.beads/issues.jsonl/.ethos/missions.jsonlrecords with the new bead/mission entries for this work.Reviewed by Cursor Bugbot for commit fd0d6f5. Bugbot is set up for automated code reviews on this repo. Configure here.