fix(process,executor): unified stdin strategy with PromptTransport + AUTO fallback (#4,#12,#13)#64
Merged
RyderFreeman4Logos merged 5 commits intomainfrom Feb 13, 2026
Conversation
…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>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PromptTransportenum (Argv/Stdin) with per-tool capability declaration. When prompt exceeds 100KB and tool supports stdin, deliver viaStdio::piped()with 30s timeout; otherwiseStdio::null()prevents hangingdefaults.toolconfig +resolve_tool()function for two-level AUTO fallback:detect_parent_tool()→config.defaults.tool→any-available-pflag for Gemini CLI and Claude Code in stdin transport mode to prevent interactive mode hangTest plan
just pre-commit— 780 unit + 8 e2e tests pass, clippy cleancargo test -p csa-executor— all prompt transport tests passcargo test -p csa-config— defaults.tool deserialization tests passcargo test -p csa-process— stdin null/piped tests pass🤖 Generated with Claude Code