MCPcopy Create free account
hub / github.com/codehamr/codehamr / dropOrphanTools

Function dropOrphanTools

internal/ctx/ctx.go:324–348  ·  view source on GitHub ↗

dropOrphanTools removes tool messages that are not part of the contiguous tool run answering the assistant directly before them: sending one alone 400s on every OpenAI-compatible backend ("tool message without preceding tool_calls"). Positional like dropDanglingToolCalls, and for the same reason: a

(kept []Message)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

PackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected