Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/anthropic_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ def _read_claude_code_credentials_from_keychain() -> Optional[Dict[str, Any]]:
"-s", "Claude Code-credentials",
"-w"],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=5,
stdin=subprocess.DEVNULL,
)
Expand Down
2 changes: 1 addition & 1 deletion agent/coding_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ def _git(cwd: Path, *args: str) -> str:
out = subprocess.run(
["git", "-C", str(cwd), *args],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=_GIT_TIMEOUT,
)
except (OSError, subprocess.SubprocessError):
Expand Down
4 changes: 2 additions & 2 deletions agent/context_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def _expand_git_reference(
["git", *args],
cwd=cwd,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=30,
stdin=subprocess.DEVNULL,
)
Expand Down Expand Up @@ -488,7 +488,7 @@ def _rg_files(path: Path, cwd: Path, limit: int) -> list[Path] | None:
["rg", "--files", str(path.relative_to(cwd))],
cwd=cwd,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=10,
stdin=subprocess.DEVNULL,
)
Expand Down
2 changes: 1 addition & 1 deletion agent/copilot_acp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def _run_prompt(self, prompt_text: str, *, timeout_seconds: float) -> tuple[str,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
text=True, encoding="utf-8", errors="replace",
bufsize=1,
cwd=self._acp_cwd,
env=_build_subprocess_env(),
Expand Down
6 changes: 3 additions & 3 deletions agent/lsp/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _install_npm(
[npm, "install", "--prefix", str(staging), "--silent", "--no-fund", "--no-audit", *install_targets],
check=False,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=300,
stdin=subprocess.DEVNULL,
)
Expand Down Expand Up @@ -308,7 +308,7 @@ def _install_go(pkg: str, bin_name: str) -> Optional[str]:
[go, "install", pkg],
check=False,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=600,
env=env,
stdin=subprocess.DEVNULL,
Expand Down Expand Up @@ -347,7 +347,7 @@ def _install_pip(pkg: str, bin_name: str) -> Optional[str]:
[sys.executable, "-m", "pip", "install", "--target", str(pip_target), "--quiet", pkg],
check=False,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=300,
stdin=subprocess.DEVNULL,
)
Expand Down
4 changes: 2 additions & 2 deletions agent/secret_sources/bitwarden.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def _platform_asset_name() -> str:
res = subprocess.run(
["ldd", "--version"],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=2,
stdin=subprocess.DEVNULL,
)
Expand Down Expand Up @@ -524,7 +524,7 @@ def _run_bws_list(
cmd,
env=env,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=_BWS_RUN_TIMEOUT,
stdin=subprocess.DEVNULL,
)
Expand Down
2 changes: 1 addition & 1 deletion agent/shell_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def _spawn(spec: ShellHookSpec, stdin_json: str) -> Dict[str, Any]:
input=stdin_json,
capture_output=True,
timeout=spec.timeout,
text=True,
text=True, encoding="utf-8", errors="replace",
shell=False,
)
except subprocess.TimeoutExpired:
Expand Down
2 changes: 1 addition & 1 deletion agent/skill_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run_inline_shell(command: str, cwd: Path | None, timeout: int) -> str:
["bash", "-c", command],
cwd=str(cwd) if cwd else None,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=max(1, int(timeout)),
check=False,
stdin=subprocess.DEVNULL,
Expand Down
2 changes: 1 addition & 1 deletion agent/transports/codex_app_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def check_codex_binary(
proc = subprocess.run(
[codex_bin, "--version"],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=10,
stdin=subprocess.DEVNULL,
)
Expand Down
2 changes: 1 addition & 1 deletion gateway/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5471,7 +5471,7 @@ def _launch_systemd_restart_shortcut(self) -> None:
"--value",
],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=2,
)
if (show.stdout or "").strip() != str(current_pid):
Expand Down
2 changes: 1 addition & 1 deletion tui_gateway/git_probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run_git(cwd: str, *args: str) -> str:
result = subprocess.run(
["git", "-C", cwd, *args],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=_GIT_TIMEOUT,
check=False,
stdin=subprocess.DEVNULL,
Expand Down
10 changes: 5 additions & 5 deletions tui_gateway/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def __init__(self, session_key: str, model: str):
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
text=True, encoding="utf-8", errors="replace",
bufsize=1,
cwd=os.getcwd(),
env=os.environ.copy(),
Expand Down Expand Up @@ -9044,7 +9044,7 @@ def _(rid, params: dict) -> dict:
str(pdf_path), str(out_prefix),
]
try:
res = subprocess.run(argv, capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL)
res = subprocess.run(argv, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=120, stdin=subprocess.DEVNULL)
except subprocess.TimeoutExpired:
return _err(rid, 5028, "pdftoppm timed out (>120s)")
if res.returncode != 0:
Expand Down Expand Up @@ -11068,7 +11068,7 @@ def _(rid, params: dict) -> dict:
r = subprocess.run(
[sys.executable, "-m", "hermes_cli.main", *argv],
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=min(int(params.get("timeout", 240)), 600),
cwd=os.getcwd(),
env=os.environ.copy(),
Expand Down Expand Up @@ -11131,7 +11131,7 @@ def _(rid, params: dict) -> dict:
qc.get("command", ""),
shell=True,
capture_output=True,
text=True,
text=True, encoding="utf-8", errors="replace",
timeout=30,
stdin=subprocess.DEVNULL,
)
Expand Down Expand Up @@ -13452,7 +13452,7 @@ def _(rid, params: dict) -> dict:
return _err(rid, 5001, "shell.exec unavailable: approval safety module not importable")
try:
r = subprocess.run(
cmd, shell=True, capture_output=True, text=True, timeout=30, cwd=os.getcwd(),
cmd, shell=True, capture_output=True, text=True, encoding="utf-8", errors="replace", timeout=30, cwd=os.getcwd(),
stdin=subprocess.DEVNULL,
)
return _ok(
Expand Down
Loading