Skip to content

fix: render boolean CLI params as presence flags in tool guidance#320

Merged
zbigniewsobiecki merged 3 commits intodevfrom
fix/boolean-flag-guidance
Feb 16, 2026
Merged

fix: render boolean CLI params as presence flags in tool guidance#320
zbigniewsobiecki merged 3 commits intodevfrom
fix/boolean-flag-guidance

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

  • Fix --include-comments true UnexpectedArgsError — oclif boolean flags are presence-based (--flag / --no-flag), but tool guidance rendered them as --flag <boolean>, causing the LLM to pass a value argument
  • Boolean flags with default: true (like include-comments) now render as [--no-flag], showing the LLM how to disable the default
  • Boolean flags without a default (like --draft, --no-commit) render as [--flag]

Companion to #318 which fixed the same class of bug for array params.

Test plan

  • All 1505 tests pass (1 new test for boolean default:true rendering)
  • TypeScript typecheck clean
  • Biome lint clean
  • Pre-commit + pre-push hooks pass

🤖 Generated with Claude Code

zbigniewsobiecki and others added 3 commits February 16, 2026 22:36
Claude Code agents were passing `--include-comments true` which oclif
rejects as an unexpected argument, since boolean flags are presence-based
(--flag or --no-flag). The tool guidance rendered them as `--flag <boolean>`
giving the LLM no indication of the correct syntax.

- Boolean params now render as `[--flag]` (default false/unset) or
  `[--no-flag]` (default true, showing how to disable)
- Fixes `read-work-item --include-comments true` → UnexpectedArgsError
- Add test for boolean flag with default:true rendering

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit 46677cf into dev Feb 16, 2026
4 checks passed
@zbigniewsobiecki zbigniewsobiecki deleted the fix/boolean-flag-guidance branch February 16, 2026 22:30
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