Resolve Custom Tool Entrypoint Relative to Working Directory in Runner#5
Merged
initializ-mk merged 2 commits intoinitializ:mainfrom Feb 23, 2026
Merged
Resolve Custom Tool Entrypoint Relative to Working Directory in Runner#5initializ-mk merged 2 commits intoinitializ:mainfrom
initializ-mk merged 2 commits intoinitializ:mainfrom
Conversation
Prefix discovered tool Entrypoint with "tools" (via filepath.Join) before creating the custom tool so execution from the agent root can find the file. A copy of the discovered tool is modified to avoid mutating the original, then passed to NewCustomTool.
initializ-mk
approved these changes
Feb 23, 2026
Contributor
initializ-mk
left a comment
There was a problem hiding this comment.
Looks good — clean, minimal fix.
Copying dt before mutating the entrypoint avoids side effects on the original slice, and filepath.Join("tools", dt.Entrypoint) correctly resolves the path relative to WorkDir so the agent root can locate the script.
Verified this applies cleanly against the in-flight core/make-skill-modular branch (PR #6) with no conflicts — the changes are in a completely separate code path.
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.
This pull request introduces a small but important fix to how custom tools are registered in the
Runner. The entrypoint for each discovered tool is now made relative to the working directory, ensuring that execution from the agent root finds the correct file."tools"with the tool's entrypoint, preventing path issues when running from the agent root. (forge-cli/runtime/runner.go, forge-cli/runtime/runner.goL133-R136)