fix(workflows): add text_mode config for Claude Code remote session compatibility (#1214)

- Add workflow.text_mode config option (default: false) that replaces
  AskUserQuestion TUI menus with plain-text numbered lists
- Document --text flag and config-set workflow.text_mode true as the
  fix for /rc remote sessions where the Claude App cannot forward TUI
  menu selections
- Update discuss-phase.md with text mode parsing and answer_validation
  fallback documentation
- Add text_mode to loadConfig defaults and VALID_CONFIG_KEYS
- Add regression tests for config-set and loadConfig
This commit is contained in:
Tom Boucher
2026-03-19 09:19:01 -04:00
parent 1427aab41b
commit 0487151142
6 changed files with 36 additions and 0 deletions

View File

@@ -16,6 +16,7 @@ const VALID_CONFIG_KEYS = new Set([
'search_gitignored', 'brave_search',
'workflow.research', 'workflow.plan_check', 'workflow.verifier',
'workflow.nyquist_validation', 'workflow.ui_phase', 'workflow.ui_safety_gate',
'workflow.text_mode',
'workflow._auto_chain_active',
'git.branching_strategy', 'git.phase_branch_template', 'git.milestone_branch_template',
'planning.commit_docs', 'planning.search_gitignored',

View File

@@ -64,6 +64,7 @@ function loadConfig(cwd) {
nyquist_validation: true,
parallelization: true,
brave_search: false,
text_mode: false, // when true, use plain-text numbered lists instead of AskUserQuestion menus
resolve_model_ids: false, // when true, resolve aliases (opus/sonnet/haiku) to full model IDs
context_window: 200000, // default 200k; set to 1000000 for Opus/Sonnet 4.6 1M models
};
@@ -108,6 +109,7 @@ function loadConfig(cwd) {
nyquist_validation: get('nyquist_validation', { section: 'workflow', field: 'nyquist_validation' }) ?? defaults.nyquist_validation,
parallelization,
brave_search: get('brave_search') ?? defaults.brave_search,
text_mode: get('text_mode', { section: 'workflow', field: 'text_mode' }) ?? defaults.text_mode,
resolve_model_ids: get('resolve_model_ids') ?? defaults.resolve_model_ids,
context_window: get('context_window') ?? defaults.context_window,
model_overrides: parsed.model_overrides || null,