Skip to content

fix(#346): never return an empty filtered stack — first-frame fallback + hiddenFrames annotation - #348

Merged
debugmcpdev merged 1 commit into
mainfrom
fix/346-empty-filtered-stack
Aug 17, 2026
Merged

fix(#346): never return an empty filtered stack — first-frame fallback + hiddenFrames annotation#348
debugmcpdev merged 1 commit into
mainfrom
fix/346-empty-filtered-stack

Conversation

@debugmcpdev

Copy link
Copy Markdown
Collaborator

An all-internal pause (e.g. a goroutine parked in Go runtime frames) used to
yield an empty get_stack_trace result under Go/.NET policies — a dead end for
agents: no frameId to anchor scopes/evaluate, and includeInternals
undiscoverable. Policies also disagreed (JS kept the first frame, Java kept
everything, Go/.NET returned []).

Central resolution in SessionManagerData so every adapter gets the same
guarantee, with the response saying what was hidden:

  • getStackTraceDetailed returns {frames, totalFrameCount, hiddenFrameCount,
    allFramesInternal}; if a policy filters every frame, the top unfiltered
    frame is kept. getStackTrace remains as a thin array wrapper, so internal
    callers (auto-continue, locals extraction) inherit the guarantee.
  • get_stack_trace tool response adds hiddenFrames + a note explaining
    includeInternals when any frames were hidden; tool description and
    docs/tool-reference.md updated.
  • Per-policy filters untouched.

Fixes #346

Co-Authored-By: Claude Fable 5 noreply@anthropic.com

…k + hiddenFrames annotation

An all-internal pause (e.g. a goroutine parked in Go runtime frames) used to
yield an empty get_stack_trace result under Go/.NET policies — a dead end for
agents: no frameId to anchor scopes/evaluate, and includeInternals
undiscoverable. Policies also disagreed (JS kept the first frame, Java kept
everything, Go/.NET returned []).

Central resolution in SessionManagerData so every adapter gets the same
guarantee, with the response saying what was hidden:

- getStackTraceDetailed returns {frames, totalFrameCount, hiddenFrameCount,
  allFramesInternal}; if a policy filters every frame, the top unfiltered
  frame is kept. getStackTrace remains as a thin array wrapper, so internal
  callers (auto-continue, locals extraction) inherit the guarantee.
- get_stack_trace tool response adds hiddenFrames + a note explaining
  includeInternals when any frames were hidden; tool description and
  docs/tool-reference.md updated.
- Per-policy filters untouched.

Fixes #346

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@debugmcpdev
debugmcpdev merged commit 0b9ec24 into main Aug 17, 2026
10 checks passed
@debugmcpdev
debugmcpdev deleted the fix/346-empty-filtered-stack branch August 17, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QUESTION] Go stack filtering can return an empty stack — should it keep the first frame like JS?

2 participants