Repository navigation
Conversation
skillsForToolCall() scanned every exec_command text for a skills/ path, so `git add -- .agents/skills/not-loaded/SKILL.md` produced a skill:not-loaded tag and renamed the tool observation even though the command only staged the file. Classify the shell segment that contains the path: tag it only when the command reads or executes the path (a reader/interpreter, a read git subcommand, a bare script path, or a nested exec_command in code-mode). Unwrap sudo, env, timeout and friends, and follow `bash -c` so legitimate reads keep working. Commands that only stage, copy, remove, or print a path no longer attribute the turn to that skill. Fixes langfuse/langfuse#19545.
This branch has not been deployed
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
skillsForToolCall()scans the rawexec_commandtext for…/SKILL.mdandskills/…/scripts/paths. It therefore treated a path that a command merely stages or prints as a skill invocation:git add -- .agents/skills/not-loaded/SKILL.mdproduced askill:not-loadedtrace tag and renamed the tool observation (langfuse/langfuse#19545).Changes
cat,sed,grep,node,python,bash, …);gitsubcommand (show,diff,grep,log,blame,cat-file);exec_command({cmd: …})in code-mode.sudo,env,timeout,command,nice,nohup,xargsand shell assignments, and followbash -c "…", so legitimate reads through wrappers keep working.git add,git status,cp,echo, …) no longer attribute the turn to that skill.git addcases, wrappers,bash -c,git show, and nested code-mode commands.Tests
node_modules/.bin/vitest run plugins/tracing/test/skills.test.ts: 8 passed (the existing five cases plus the new command-attribution cases).npx prettier@3.9.8 --config .prettierrc.json --check plugins/tracing/src/skills.ts plugins/tracing/test/skills.test.ts: clean.This is a command-classification heuristic, not a blanket command allowlist: wrappers,
-cshells, bare script paths, and code-modeexec_commandcalls are handled. It deliberately does not try to interpret arbitrary programs (for example a Python snippet that opens a skill file through a non-command API).Fixes langfuse/langfuse#19545.