Summary
Request for more granular and configurable verbose/debug output options when running Claude Code in GitHub Actions, with resilient parameter handling that gracefully falls back to defaults when options are deprecated or unavailable.
Current State
Available Options (claude-code-action v1.0)
| Option |
Type |
Description |
show_full_output |
Action Input |
Shows full JSON output including tool execution details (default: false) |
claude_args: --verbose |
CLI Flag |
Enables verbose mode with expanded logging |
claude_args: --debug |
CLI Flag |
Enables debug-level tracing |
--output-format stream-json |
CLI Flag |
Outputs structured JSON for CI/debugging |
ACTIONS_STEP_DEBUG=true |
Env Var |
Automatically enables full output in debug mode |
Known Limitations (from existing issues)
- anthropics/claude-code#4859:
--debug outputs to stdout instead of stderr; --verbose has no effect in print mode
- anthropics/claude-code#6308: All-or-nothing approach - no way to show timing/tokens without full debug logs
- anthropics/claude-code#3217 / #7012: Verbose setting fails to persist across sessions
- anthropics/claude-code#15066: Hook outputs not appearing in stream-json logs
Proposed Enhancement
1. New Workflow Input Parameters
Add configurable verbosity levels as workflow inputs:
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: "Fix this bug"
# Granular verbosity controls
verbosity: "normal" # Options: minimal | normal | verbose | debug
show_tool_output: true
show_timing: true
show_token_usage: true
log_format: "human" # Options: human | json | stream-json
2. Environment Variable Configuration
Support configuration via environment variables in the settings input:
settings: |
{
"env": {
"CLAUDE_VERBOSITY": "verbose",
"CLAUDE_SHOW_TIMING": "true",
"CLAUDE_SHOW_TOKENS": "true"
}
}
3. Verbosity Levels Definition
| Level |
Description |
Shows |
minimal |
Errors only |
Errors, permission denials, final status |
normal |
Default behavior |
Init, result, errors, summary |
verbose |
Detailed execution |
+ Tool calls, timing, token usage |
debug |
Full tracing |
+ All internal events, JSON output |
Resilient Parameter Handling (Critical)
Problem: When parameters are deprecated or phased out, workflows should not break.
Proposed Solution: Graceful Degradation Pattern
function resolveVerbosity(inputs: ActionInputs): VerbosityConfig {
const warnings: string[] = [];
const config: VerbosityConfig = { level: 'normal' }; // Safe default
// Handle deprecated parameters gracefully
const deprecatedParams = ['old_verbose_flag', 'legacy_debug_mode'];
for (const param of deprecatedParams) {
if (inputs[param] !== undefined) {
warnings.push(`⚠️ Parameter '${param}' is deprecated. Use 'verbosity' instead.`);
}
}
// Validate current parameters with fallback
if (inputs.verbosity) {
const validLevels = ['minimal', 'normal', 'verbose', 'debug'];
if (validLevels.includes(inputs.verbosity)) {
config.level = inputs.verbosity;
} else {
warnings.push(`⚠️ Unknown verbosity level '${inputs.verbosity}'. Falling back to 'normal'.`);
}
}
// Log warnings but don't fail
for (const warning of warnings) {
core.warning(warning);
}
return config;
}
Key Principles
- Never fail on unknown/deprecated parameters - Log warning, use default
- Semantic versioning for breaking changes - Major version bump if behavior changes
- Deprecation notices in logs - Clear messages about what to migrate to
- Maintain backwards compatibility - Old parameters should work until next major version
Example Warning Output
⚠️ Deprecated parameter detected: 'verbose=true'
This parameter will be removed in v2.0.
Migration: Use 'verbosity: verbose' instead.
Falling back to default behavior. Workflow will continue.
Optional: Auto-Report Feature
- uses: anthropics/claude-code-action@v1
with:
verbosity: verbose
report_deprecated_params: true # Creates issue if deprecated params used
When enabled, could automatically create/update an issue in the user's repo listing deprecated parameters detected.
Implementation Considerations
CLI Flag Mapping
switch (config.level) {
case 'debug':
cliArgs.push('--debug', '--verbose');
break;
case 'verbose':
cliArgs.push('--verbose');
break;
case 'minimal':
cliArgs.push('--quiet'); // May need new flag
break;
}
Integration with show_full_output
// show_full_output takes precedence for backwards compatibility
if (inputs.show_full_output === 'true') {
config.level = 'debug';
}
Testing Matrix
| Scenario |
Expected Behavior |
verbosity: unknown_value |
Warning + fallback to normal |
verbose: true (deprecated) |
Warning + map to verbosity: verbose |
| No verbosity params |
Use normal default |
ACTIONS_STEP_DEBUG=true |
Override to debug (existing behavior) |
Related Issues
Success Criteria
- Users can configure verbosity without using
claude_args
- Deprecated parameters log warnings but don't break workflows
- Clear migration path documented for each deprecation
- Verbosity levels are intuitive and well-documented
- Backwards compatibility maintained until major version bump
Summary
Request for more granular and configurable verbose/debug output options when running Claude Code in GitHub Actions, with resilient parameter handling that gracefully falls back to defaults when options are deprecated or unavailable.
Current State
Available Options (claude-code-action v1.0)
show_full_outputfalse)claude_args: --verboseclaude_args: --debug--output-format stream-jsonACTIONS_STEP_DEBUG=trueKnown Limitations (from existing issues)
--debugoutputs to stdout instead of stderr;--verbosehas no effect in print modeProposed Enhancement
1. New Workflow Input Parameters
Add configurable verbosity levels as workflow inputs:
2. Environment Variable Configuration
Support configuration via environment variables in the
settingsinput:3. Verbosity Levels Definition
minimalnormalverbosedebugResilient Parameter Handling (Critical)
Problem: When parameters are deprecated or phased out, workflows should not break.
Proposed Solution: Graceful Degradation Pattern
Key Principles
Example Warning Output
Optional: Auto-Report Feature
When enabled, could automatically create/update an issue in the user's repo listing deprecated parameters detected.
Implementation Considerations
CLI Flag Mapping
Integration with
show_full_outputTesting Matrix
verbosity: unknown_valuenormalverbose: true(deprecated)verbosity: verbosenormaldefaultACTIONS_STEP_DEBUG=truedebug(existing behavior)Related Issues
show_full_outputSuccess Criteria
claude_args