Repository navigation
Step in when a request can't make progress: unreachable sites, thinking in circles, empty replies, cd out of the project, unrun scripts - #139
Merged
Conversation
From a real session that spent an hour on an Android build whose downloads this machine couldn't reach, then ended without a word: - A site that fails for three different calls, and never answers, gets a note (check one address that must exist, then tell the user); two more and the request stops (status blocked). Every guessed address differed, so the repeat check never fired. - Thinking that goes round in circles is stopped as it streams and the model is asked for its next step (the session's last reply: 70,000 characters of four paragraphs, repeated until the context was full). - An empty or cut-off reply no longer ends the request as done: one more chance, then a stop that offers the stronger model when one is set. - A cd out of the project no longer moves lcode there (the session had been saved under /tmp); sessions are saved under the folder lcode works in. - A shell script written and never run is sent back once before done. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
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.
Why
A real session spent about 1.5 hours on an Android build (buildozer) and ended with no answer at all. The cause was outside lcode's reach: from that network, Google's Android SDK/NDK repository answers 404 to everything, even its index file. But nothing in lcode noticed, and several things made it worse:
success, with nothing for the user to read.cd /tmpmoved lcode there. The session, the project checks and the memory notes all followed, and the session was saved under/tmp, solcode -cin the project couldn't find it.build_android.sh, never ran it, and called the job done; its first line failed for the user.What changes
lcode/unreachable.py):Status: 404lines a model's own loops print; names that don't resolve; refused or timed-out connections.HTTPS_PROXY, a mirror, CI).blocked.repeats.Circles): the thinking is watched as it streams. When 16 of the last 20 sentences have each been seen at least 4 times, lcode closes the stream (which stops the model), drops the reply and asks for a short one.done_reason: length) before saying anything gets one more chance.loop.done_reasonfromfinish_reason.cdwithin the project (its git root, or the folder lcode works in) is kept. One out of it isn't, and the result says so.Agent.workspaceis the folder lcode was started in, or moved to with/cd, a resumed session or the bench. Sessions are saved under it, andlcode -clooks it up there..sh/.bash/.zsh, or a shell shebang) and no command ran it, it's sent back once before the answer counts.chmod,catorgit adddon't count as running it. Off withchecks = "off".repeat_limit = 0also turns off the unreachable-site and circles checks.Evidence
The failed session, replayed:
False alarms:
Real model, real network: I gave
lcode -pwith qwen3.6-35b this task: "Download the Android NDK r27c for Linux from Google into ./ndk…".success, and a confident wrong answer: "r27c does not exist as an official Android NDK release".Tests:
tests/test_stuck.py(17 tests) covers all five cases, andtests/test_backends.pycovers the cut-off signal. The suite and the strict docs build pass.🤖 Generated with Claude Code