Merged explicit config path error handling with main branch changes:
- Preserved error handling for explicit --config flag failures
- Integrated with main branch service initialization patterns
- Maintained proper error propagation for config validation
The merge conflict was handled by claude, please verify the changes.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Fix service initialization race condition where getAllTools() would return
all tools when ToolPermissionService wasn't ready, causing plan mode to
incorrectly include excluded tools like Bash.
The issue occurred in GitHub Actions where `cn -p` (plan mode) should exclude
Bash tool, but due to timing issues, Bash was being presented to the LLM and
then failing during execution with permission errors.
Changes:
- Fix getAllTools() to properly pass permissions to filterExcludedTools()
- Throw descriptive error when service not initialized instead of fallback
- Add comprehensive regression tests covering all modes and edge cases
Fixes automated PR review failures in GitHub Actions workflows.
Fixes issue where the --config flag was being ignored and the CLI would
silently fall back to ~/.continue/config.yaml instead of the specified
config file.
Changes:
- Add proper error handling in runNormalFlow() for explicit --config failures
- Fix config precedence in initializeServices() to prefer --config over saved state
- Add integration tests to verify config loading behavior
Resolves config loading falling back silently when explicit config path fails.
Add --silent flag to headless mode (-p/--print) that removes <think></think>
tags and excess whitespace from LLM responses. This enables clean output
suitable for shell piping and automation.
## Why --silent instead of --no-think
The flag was renamed from --no-think to --silent because:
- Commander.js treats --no- prefix as negation flags, expecting a base --think option
- --silent provides clearer semantic meaning for "quiet, clean output"
- Follows Unix convention where --silent typically means suppress extra output
## Problem Solved
Many models (like Nemotron - Llama 3.3 Nemotron Super 49B v1.5) emit <think></think>
tags that interfere with shell piping:
Without --silent:
```
$ cn -p "Echo a shell script that prints 'Hello World' Output only the script and NOTHING ELSE. No code fences. No markdown."
<think>
I need to write a shell script. Let me think about this.
The user wants a simple Hello World script.
</think>
#\!/bin/bash
echo "Hello World"
```
With --silent:
```
$ cn -p --silent "Echo a shell script that prints 'Hello World' Output only the script and NOTHING ELSE. No code fences. No markdown."
#\!/bin/bash
echo "Hello World"
```
This makes piping work correctly:
```
$ eval $(cn -p --silent "Write a shell script that prints 'Hello World'")
Hello World
```
## Features
- Strips all <think></think> blocks and their content
- Reduces excessive whitespace (3+ consecutive newlines become 2)
- Works with --format json flag
- Includes comprehensive unit and e2e tests
- Only available with -p/--print flag (headless mode)