@devries-cameron20 / t3code-1 / commits / 1d1a8e5b07
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(provider-acp): name the rejected agent path on stderr and test the bash path (#18489)

Co-authored-by: Victor Vogel <263261067+only21mil@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Victor Vogel committed Oct 18, 2026 at 14:07 UTC 1d1a8e5b071413b412481544a9a0c7528a66bb25
2 files changed +12 -2
apps/server/src/provider/acp/AcpSessionRuntime.processTree.test.ts
+9
@@ -306,6 +306,15 @@ describe("terminatePosixOwnedProcessTree", () => {
306 },
307 );
308 expect(missingTargetResult.status, missingTargetResult.stderr).toBe(125);
309 + // CI's /bin/sh is dash, which runs the EXIT trap after a failed exec. Bash does not,
310 + // so run the same wrapper under bash too.
311 + const missingTargetBash = NodeChildProcess.spawnSync("bash", missingTarget.args, {
312 + encoding: "utf8",
313 + });
314 + if ((missingTargetBash.error as NodeJS.ErrnoException | undefined)?.code !== "ENOENT") {
315 + expect(missingTargetBash.status, missingTargetBash.stderr).toBe(125);
316 + expect(missingTargetBash.stderr).toContain("/nonexistent-t3-probe");
317 + }
318 } finally {
319 packagedExecPath.mockRestore();
320 NodeFS.rmSync(scratch, { recursive: true, force: true });
packages/provider-acp/src/server/AcpSessionRuntime.ts
+3 -2
@@ -284,8 +284,9 @@ export function wrapCommandForLinuxCgroup(
284 // trap, so a missing agent binary reported "killed by the wrapper"
285 // instead of "never launched". The caller always hands us an absolute
286 // target, so test it as an executable file rather than asking the
287 - // shell to resolve it.
288 - '[ -f "$1" ] && [ -x "$1" ] || exit 125',
287 + // shell to resolve it. Name the target before exiting: exit 125 alone
288 + // does not say which path was rejected.
289 + '[ -f "$1" ] && [ -x "$1" ] || { printf "%s: %s: not an executable file\\n" "$0" "$1" >&2; exit 125; }',
290 'exec "$@"',
291 ].join("\n"),
292 "t3-acp-cgroup-wrapper",