Skip to content

fix(cli): preserve literal verbosity flags after -- - #840

Open
Shubham-Padkonde wants to merge 1 commit into
Panniantong:mainfrom
Shubham-Padkonde:fix/preserve-literal-verbose-arguments
Open

Shubham-Padkonde wants to merge 1 commit into
Panniantong:mainfrom
Shubham-Padkonde:fix/preserve-literal-verbose-arguments

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

The console entry point removes every -v and --verbose token before the action parser sees it, including literal query text after --. For example, agent-reach web search -- --verbose becomes a missing-query error, while agent-reach web search -- explain --verbose option silently searches for explain option and enables logging.

Only extract verbosity flags before the first --, and forward the separator and its suffix unchanged. Existing verbose flags before that separator, including after the command, continue to work. No channel or network behavior changes.

Five regression cases exercise the console entry point through the real action parser and a local fake backend: literal short/long flags, a multi-word query, explicit verbose mode combined with a literal flag, and the existing trailing-flag behavior. Four fail on unchanged main; all five pass with the fix.

Validation on Windows / Python 3.13, using the repository's dependency constraints:

  • Full suite: 471 passed, 7 skipped, 3 failed. The three failures concern skill-link symlink creation; each also fails on unchanged main in this Windows environment.
  • ruff check agent_reach tests passes.
  • mypy agent_reach passes (49 source files).
  • git diff --check passes.

AI assistance was used for investigation, implementation and validation. No live credentials or live channel requests were used for this argument-parsing fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant