Files
PaperClipAI/docs/adapters
082423000e fix(claude-local): retain probe budget for unlimited runs (#15329)
## Thinking Path

> - Paperclip starts Claude agents through the local adapter.
> - The CLI engine checks its version and effort flag before a run.
> - An unset run timeout resolves to zero and means unlimited.
> - The probe code turns that zero into a one-second timeout.
> - A valid CLI that starts slowly then fails the version gate.
> - This pull request gives unlimited runs the existing 20-second probe
cap.
> - The probe can confirm a valid installed CLI before the run starts.

## Linked Issues or Issue Description

Fixes: #15258.
Related PRs #13927 and #14954 change version/model gates. This change
fixes the timeout for the probes used by those gates.

## What Changed

- Use a 20-second process timeout for version and effort probes when the
run timeout is zero or negative.
- Keep the existing cap and one-second floor for positive timeouts.
- Add real slow-CLI regressions.

## Verification

- A real fixture CLI prints its version and help after 1.5 seconds. The
unlimited-timeout case fails on the original source and passes after the
fix.
- An explicit one-second timeout still stops both probes.
- The complete Claude adapter source suite passes: 346 tests, 1 skipped.
The command excludes generated `dist/` tests, as the repository runner
does.
- Full workspace typecheck and build pass in the verification checkout.
- The full `pnpm test:run` attempt was stopped after it reported the
unchanged rapid-Slack ordering assertion. A clean checkout at `f858207`
reproduces it (3 comments, expected 8). Native V8 coverage shows that
the functions changed by these three fixes are not called in that
control. Additional broad checks reported timeouts and assertions in
unmodified files; those extra failures were not all reproduced as
clean-base controls; this is not a claim that the full repository suite
is green.
- Repository-wide typecheck and build were run with three independent
fixes together. This PR includes only the Claude probe change. The
affected source suites listed above pass.

## Risks

Unlimited run settings now use a 20-second process timeout for
capability probes. A probe for a CLI that hangs can therefore fail
later. The real executable fixture runs on POSIX hosts and skips
Windows; no live Claude account or remote provider was used.

## Model Used

OpenAI Codex, a GPT-6-based coding agent, with reasoning, repository
inspection, editing and local test execution. This session did not
expose the exact deployed model ID or context-window size.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [ ] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

CI and Greptile must finish on the updated head after removal of the
documentation change.

---------

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Andrew Aymeloglu <aaymeloglu@gmail.com>
2026-10-14 16:24:41 -05:00
..
…