feat(cli): forward extra arguments to launched agent#284
Merged
Conversation
Allow users to pass flags through to the agent process: lore claude --dangerously-skip-permissions lore run claude --model gpt-4 lore -- --verbose (auto-detect mode) Uses parseArgs tokens to identify the agent name position in argv, then slices everything after it as raw passthrough args. Supports '--' as separator for the auto-detect case (no agent name given).
5d0d8ae to
18450fb
Compare
This was referenced May 13, 2026
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
lore runor the agent shorthandparseArgstoken stream to identify the agent name position in argv, then slices everything after it as raw passthrough args--as separator to forward flags that share names with lore's own optionsExamples
Changes
main.ts: Enabletokens: trueinparseArgs, addextractAgentArgs()helper with three strategies:--separator: everything after it goes to the agentrun.ts: Accept and forwardextraArgsparameter throughcommandRun→resolveLaunchTarget→launchChildhelp.ts: Document argument forwarding with an "Agent arguments" section and new examplesKnown Limitations
--, only boolean-style flags (e.g.--dangerously-skip-permissions) can be forwarded. Value-bearing flags like--model gpt-4cannot be reconstructed becauseparseArgstreats unknown flags as booleans and separates the value as a positional. Use--for those:lore -- --model gpt-4--port,--debug,--host) are consumed by lore regardless of position. Use--to prevent this:lore run claude -- --port 8080