feat: add --dir flag to /run, /chain, /parallel commands#47
Open
vedang wants to merge 8 commits intonicobailon:mainfrom
Open
feat: add --dir flag to /run, /chain, /parallel commands#47vedang wants to merge 8 commits intonicobailon:mainfrom
vedang wants to merge 8 commits intonicobailon:mainfrom
Conversation
nicobailon
added a commit
that referenced
this pull request
Mar 12, 2026
Add --no-skills to the async runner so background subagents with explicit skills don't get the full catalog injected (PR #41 only fixed the sync path). Expand ~ in sessionDir and defaultSessionDir config values. Append runId to defaultSessionDir to prevent collisions across multiple subagent calls. Remove dead resolveSessionRoot() whose contract diverged from the inline logic, along with PR #47 scaffolding and tests from path-handling.test.ts.
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
Adds optional
--dir <path>flag to/run,/chain, and/parallelslash commands to control working directories and isolate artifacts in task-specific folders.Changes
extractTrailingFlags()helper to parse--dirand--bgflags with quote-aware reverse-scanningstripSurroundingQuotes()to handle quoted path valuestakeTrailingArg()for robust argument extractionapplyInlineConfigToStep(),buildChainStep(),buildParallelTask()helpers to reduce duplication/runhandler to setcwdwhen--dirprovided/chainhandler to injectchainDirwhen--dirprovided/parallelhandler to injectchainDirwhen--dirprovided--dirflag--dirusagesession-persistence-investigation.mdfor referenceBehavior
/run ... --dir <path>: Setscwdparameter for the subagent run/chain ... --dir <path>: InjectschainDirfor chain artifacts/parallel ... --dir <path>: InjectschainDirfor parallel artifactsctx.cwd--diromitted, existing default behavior preserved--diror--bgsubstrings correctly handledExamples
Related Issue
Closes: #45