← Back to PRs

#23720: Feat/cli backend runtime tuning

by wanmorebot open 2026-02-22 16:34 View on GitHub →
agents size: L
## Summary Describe the problem and fix in 2–5 bullets: - Problem: - Why it matters: - What changed: - What did NOT change (scope boundary): ## Change Type (select all) - [ ] Bug fix - [ ] Feature - [ ] Refactor - [ ] Docs - [ ] Security hardening - [ ] Chore/infra ## Scope (select all touched areas) - [ ] Gateway / orchestration - [ ] Skills / tool execution - [ ] Auth / tokens - [ ] Memory / storage - [ ] Integrations - [ ] API / contracts - [ ] UI / DX - [ ] CI/CD / infra ## Linked Issue/PR - Closes # - Related # ## User-visible / Behavior Changes List user-visible changes (including defaults/config). If none, write `None`. ## Security Impact (required) - New permissions/capabilities? (`Yes/No`) - Secrets/tokens handling changed? (`Yes/No`) - New/changed network calls? (`Yes/No`) - Command/tool execution surface changed? (`Yes/No`) - Data access scope changed? (`Yes/No`) - If any `Yes`, explain risk + mitigation: ## Repro + Verification ### Environment - OS: - Runtime/container: - Model/provider: - Integration/channel (if any): - Relevant config (redacted): ### Steps 1. 2. 3. ### Expected - ### Actual - ## Evidence Attach at least one: - [ ] Failing test/log before + passing after - [ ] Trace/log snippets - [ ] Screenshot/recording - [ ] Perf numbers (if relevant) ## Human Verification (required) What you personally verified (not just CI), and how: - Verified scenarios: - Edge cases checked: - What you did **not** verify: ## Compatibility / Migration - Backward compatible? (`Yes/No`) - Config/env changes? (`Yes/No`) - Migration needed? (`Yes/No`) - If yes, exact upgrade steps: ## Failure Recovery (if this breaks) - How to disable/revert this change quickly: - Files/config to restore: - Known bad symptoms reviewers should watch for: ## Risks and Mitigations List only real risks for this PR. Add/remove entries as needed. If none, write `None`. - Risk: - Mitigation: <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR adds streaming support for the Claude CLI backend by introducing a new `stream-json-parser` module and integrating it into the CLI runner. The parser buffers incomplete JSON lines, emits text deltas in real-time, and captures session metadata. Key changes: - Added `streaming` flag to backend config (defaults to `false` for Claude backend) - Set watchdog timeout to max int32 (2,147,483,647ms) effectively disabling output timeout for long sessions - Changed `serialize` from `true` to `false` for concurrent execution - Added environment variable cleanup for `CLAUDECODE` and `CLAUDE_CODE` - Modified system prompt to reduce narration verbosity - Comprehensive test coverage for the streaming parser (300 lines) <h3>Confidence Score: 4/5</h3> - This PR is safe to merge with thorough testing - Well-structured implementation with comprehensive test coverage, proper error handling, and backward compatibility. The streaming parser has 14 test cases covering edge cases. The main concern is the significant runtime behavior changes (disabling serialization, removing output timeout, enabling concurrency) which need production validation. - Pay close attention to `src/agents/cli-backends.ts` for the watchdog timeout and serialization changes, and `src/agents/cli-runner.ts` for the streaming integration logic <sub>Last reviewed commit: 0e61a13</sub> <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> <!-- /greptile_comment -->

Most Similar PRs