Skip to content

add cross_service flag to trace tool#256

Merged
HumanBean17 merged 1 commit into
experimentalfrom
feature/trace-cross-service-flag
May 31, 2026
Merged

add cross_service flag to trace tool#256
HumanBean17 merged 1 commit into
experimentalfrom
feature/trace-cross-service-flag

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

Summary

  • Add cross_service: bool = False parameter to trace tool — when True, BFS continues through HTTP_CALLS/ASYNC_CALLS boundaries into downstream services
  • EXPOSES is auto-added as scaffolding (exempt from fan_out_cap) so Route → Handler is followed automatically in downstream services
  • Default (False) preserves existing boundary-stop behavior with no regression

Context

During battle testing, agents expected trace to cross service boundaries seamlessly but had no way to control it. A description wouldn't fix this — the agent needs to control the behavior, not just read about it. The boolean flag is the smallest change that solves the problem.

Changes

  • mcp_trace.py — new param, effective scaffolding set, frontier continues through boundaries when enabled
  • server.py — register param, update description, wire through
  • mcp_hints.py — emit lightweight advisory instead of action hint when seamless
  • tests/test_mcp_trace.py — 4 new tests (seamless HTTP, async, budget, scaffolding exemption)
  • skills/explore-codebase/SKILL.md — updated decision table and tool reference

Test plan

  • All 38 trace tests pass (including 4 new seamless cross-service tests)
  • All 169 related MCP tests pass with no regressions
  • ruff check clean on all modified files

🤖 Generated with Claude Code

Agents expected trace to cross service boundaries but couldn't control it.
Add `cross_service: bool = False` parameter — when True, BFS continues
through HTTP_CALLS/ASYNC_CALLS boundaries into downstream services.
EXPOSES is auto-added as scaffolding (exempt from fan_out_cap) so
Route -> Handler is followed automatically. Default preserves existing
boundary-stop behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@HumanBean17 HumanBean17 merged commit fa24ac4 into experimental May 31, 2026
1 check passed
HumanBean17 added a commit that referenced this pull request May 31, 2026
…256)

Agents expected trace to cross service boundaries but couldn't control it.
Add `cross_service: bool = False` parameter — when True, BFS continues
through HTTP_CALLS/ASYNC_CALLS boundaries into downstream services.
EXPOSES is auto-added as scaffolding (exempt from fan_out_cap) so
Route -> Handler is followed automatically. Default preserves existing
boundary-stop behavior.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
HumanBean17 added a commit that referenced this pull request May 31, 2026
…256)

Agents expected trace to cross service boundaries but couldn't control it.
Add `cross_service: bool = False` parameter — when True, BFS continues
through HTTP_CALLS/ASYNC_CALLS boundaries into downstream services.
EXPOSES is auto-added as scaffolding (exempt from fan_out_cap) so
Route -> Handler is followed automatically. Default preserves existing
boundary-stop behavior.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
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.

1 participant