Skip to content

fix(process,executor): unified stdin strategy with PromptTransport + AUTO fallback (#4,#12,#13)#64

Merged
RyderFreeman4Logos merged 5 commits intomainfrom
fix/stdin-prompt-auto-fallback
Feb 13, 2026
Merged

fix(process,executor): unified stdin strategy with PromptTransport + AUTO fallback (#4,#12,#13)#64
RyderFreeman4Logos merged 5 commits intomainfrom
fix/stdin-prompt-auto-fallback

Conversation

@RyderFreeman4Logos
Copy link
Owner

Summary

Test plan

  • just pre-commit — 780 unit + 8 e2e tests pass, clippy clean
  • cargo test -p csa-executor — all prompt transport tests pass
  • cargo test -p csa-config — defaults.tool deserialization tests pass
  • cargo test -p csa-process — stdin null/piped tests pass
  • @codex review

🤖 Generated with Claude Code

RyderFreeman4Logos and others added 5 commits February 12, 2026 20:52
…pability

[MOTIVATION]
Two related issues: (1) spawn_tool() didn't set stdin, causing claude-code to
hang waiting for stdin input (Issue #13); (2) all prompts passed via argv,
risking ARG_MAX overflow for large prompts (Issue #12).

[IMPLEMENTATION DETAILS]
- Add PromptTransport enum (Argv/Stdin) to csa-core with per-tool capability
  declarations: codex/gemini/claude support both, opencode argv-only
- Modify build_command() to return (Command, Option<Vec<u8>>) — selects
  stdin transport when prompt > 100KB and tool supports it
- Modify spawn_tool() to accept stdin_data: Option<Vec<u8>> — pipes data
  with 30s timeout when Some, uses Stdio::null() when None
- Update pipeline.rs to thread stdin_data through to spawn_tool()
- Add comprehensive tests: transport capability matrix, stdin null/piped
  behavior, long prompt routing, opencode argv-only warning

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…#4)

[MOTIVATION]
When csa review/debate is called outside a CSA session (e.g., directly
from Claude Code), auto tool detection fails because CSA_TOOL and
CSA_PARENT_TOOL env vars are absent. This causes "AUTO review tool
selection failed" with no graceful fallback path.

[IMPLEMENTATION DETAILS]
- Add `tool: Option<String>` to `DefaultsConfig` in GlobalConfig
- Add `resolve_tool()` in run_helpers.rs: detection → config → None
- Update review_cmd, debate_cmd, main.rs to use resolve_tool()
- Two-level fallback: detect_parent_tool() → config.defaults.tool → any-available
- detect_parent_tool() stays unchanged (pure detection only)
- Add 5 tests covering resolve_tool logic and config deserialization

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
[MOTIVATION]
The Phase 4 APPROVE option in the mktd skill did not clearly indicate
that the next step is to use the mktsk skill for execution, causing
potential confusion about the post-approval workflow.

[IMPLEMENTATION DETAILS]
- Changed "Approve" to "Approve, 使用 mktsk" in Phase 4 User Options

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
[MOTIVATION]
Pre-PR local review (main...HEAD) identified two issues:
- P1: Chinese text in mktd SKILL.md violates Meta 003 communication rule
- P2: Missing long-prompt stdin transport tests for Gemini CLI and Claude Code

[IMPLEMENTATION DETAILS]
- Changed mktd approve option label to English
- Added long-prompt stdin tests for Gemini CLI and Claude Code executors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
[MOTIVATION]
Local review P1: when long prompts go through stdin transport, the -p
flag was entirely skipped for Gemini CLI and Claude Code. Without -p,
these tools enter interactive mode, causing automation to hang.

[IMPLEMENTATION DETAILS]
- In stdin mode, still emit -p (without prompt arg) for gemini/claude
- Codex/opencode don't need extra flags for stdin reading
- Updated tests to assert -p presence in stdin transport mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@RyderFreeman4Logos RyderFreeman4Logos merged commit 4c6e3fc into main Feb 13, 2026
5 checks passed
@RyderFreeman4Logos RyderFreeman4Logos deleted the fix/stdin-prompt-auto-fallback branch February 13, 2026 05:23
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