fix: stop recommending automatic Java launch retries - #1701
Open
wenyt (wenytang-ms) wants to merge 3 commits into
Open
wenyt (wenytang-ms) wants to merge 3 commits into
wenyt (wenytang-ms) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The implementation is focused and well tested, with only a minor guidance inconsistency remaining.
Pull request overview
Updates model-facing Java debugging guidance to prevent automatic retries after failures or timeouts.
Changes:
- Standardizes launch failure and timeout guidance.
- Corrects timeout outcomes and telemetry.
- Adds focused regression coverage.
File summaries
| File | Description |
|---|---|
| test/languageModelToolLaunchPolicy.test.ts | Tests retry policy and timeout handling. |
| src/languageModelTool.ts | Updates launch results and telemetry. |
| resources/skills/java-launch-troubleshooting/SKILL.md | Revises launch troubleshooting guidance. |
| resources/skills/java-debug-inspection/SKILL.md | Revises inspection failure guidance. |
| resources/instruments/javaDebugContext.instructions.md | Aligns model instructions with the policy. |
| package.json | Updates the tool description. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🔵 Needs a closer look
The shipped JavaDebug agent still recommends retries and terminal fallback.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
resources/instruments/javaDebugContext.instructions.md:16
- The shipped
bundled/agents/debug.agent.mdstill contradicts this policy. It says a missing session can be safely restarted (lines 176 and 185), asks the user to try again after no session (line 233), and recommends runningmvn compileorgradle buildbefore retrying (line 251). JavaDebug agent sessions can therefore continue recommending the automatic retries and terminal fallback this PR intends to stop. Update that agent guidance and include it in the consistency test.
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Balanced
wenyt (wenytang-ms)
marked this pull request as ready for review
September 18, 2026 09:23
wenyt (wenytang-ms)
requested review from
Changyong Gong (chagong),
Sheng Chen (jdneo) and
Jinbo Wang (testforstephen)
as code owners
September 18, 2026 09:23
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.
Summary
Stop recommending automatic Java launch retries after the first failure or timeout. This is a focused model-facing policy change, independent of the readiness design in #1696.
outcome=timeoutanderrorCategory=timeoutfor both wait modes.Scope
This updates guidance consumed by the model; it does not add a runtime retry counter or lock out subsequent tool invocations. The extension does not have an automatic relaunch loop to remove. Existing wait limits, readiness initialization, cancellation handling, session replacement behavior, and confirmed-start behavior are unchanged.
Validation
npm run compilegit diff --checkRegression cases cover both timeout paths, both confirmed-start paths, returned failure, exceptions, disabled No-Config debugging, timeout telemetry, consistent manifest/skill guidance, and no additional launch/stop/terminal-disposal side effects during timeout handling.