Skip to content

🧰 fix: Clarify Tool Output Reference Content Mode#133

Draft
danny-avila wants to merge 1 commit intodevfrom
danny-avila/fix-tool-output-ref-truncation
Draft

🧰 fix: Clarify Tool Output Reference Content Mode#133
danny-avila wants to merge 1 commit intodevfrom
danny-avila/fix-tool-output-ref-truncation

Conversation

@danny-avila
Copy link
Copy Markdown
Owner

Summary

I clarified tool output reference behavior so full raw output remains the default parser/piping path while adding an explicit visible-content mode for stricter deployments.

  • Preserved raw post-hook output as the default reference snapshot so downstream parser tools can consume full JSON, CSV, logs, and command output even when ToolMessage.content is truncated.
  • Added toolOutputReferences.referenceContent with raw and visible modes to make the substitution boundary explicit.
  • Threaded the reference-content policy through graph-created ToolNodes so direct, event-driven, and multi-agent execution use the same setting.
  • Updated Bash/tool-reference guidance and type comments to document the intended full-output behavior and the visible-content escape hatch.
  • Expanded ToolNode regression coverage for raw-default and visible-mode substitutions across direct and event-driven tool paths.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation update

Testing

  • Ran npx tsc --noEmit.
  • Ran npm test -- src/tools/__tests__/ToolNode.outputReferences.test.ts --runInBand.
  • Pre-commit hooks ran prettier --write and eslint --fix for staged files.

Test Configuration:

  • Node.js: v20.19.5
  • npm: 10.8.2

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila
Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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