Skip to content

fix: Refine Bash PTC File Guidance#189

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/ptc-bash-output-guidance
May 21, 2026
Merged

fix: Refine Bash PTC File Guidance#189
danny-avila merged 1 commit into
mainfrom
danny-avila/ptc-bash-output-guidance

Conversation

@danny-avila
Copy link
Copy Markdown
Owner

Summary

I refined bash PTC file/output guidance and added a small runtime reminder for /tmp scratch files.

  • Clarified that handoff artifacts must use /mnt/data and that /tmp is same-call scratch, not later-call storage.
  • Added an output-side /tmp reminder when submitted code mentions /tmp, so the model gets feedback right after the risky pattern appears.
  • Updated bash PTC guidance and examples to save reusable parallel outputs under /mnt/data and parse saved tool stdout with jq -r 'fromjson? // . | ...' for object or stringified-JSON results.
  • Preserved the existing compact generated-file summary behavior while keeping host artifacts unchanged.

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

  • npx jest src/tools/__tests__/ProgrammaticToolCalling.test.ts src/tools/__tests__/BashExecutor.test.ts --runInBand
  • npx eslint src/tools/CodeExecutor.ts src/tools/BashExecutor.ts src/tools/ProgrammaticToolCalling.ts src/tools/BashProgrammaticToolCalling.ts src/tools/__tests__/ProgrammaticToolCalling.test.ts src/tools/__tests__/BashExecutor.test.ts
  • npx tsc --noEmit
  • Live smoke with claude-sonnet-4-6 against http://localhost:3112/v1: Claude saved reusable files under /mnt/data, reused them in a follow-up code-tool call, and used fromjson? // . when parsing saved tool stdout. It still inspected raw output once when it guessed unknown field names, which is schema discovery rather than the encoding issue.

Test Configuration:

  • Code API: http://localhost:3112/v1
  • Model: claude-sonnet-4-6

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • 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

@danny-avila danny-avila changed the title 🧭 fix: Refine Bash PTC File Guidance fix: Refine Bash PTC File Guidance May 21, 2026
@chatgpt-codex-connector
Copy link
Copy Markdown

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

ℹ️ 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".

@danny-avila
Copy link
Copy Markdown
Owner Author

Live smoke against claude-sonnet-4-6 and http://localhost:3112/v1 after opening the PR:

  • Claude saved reusable bash PTC outputs under /mnt/data on the first try, not /tmp.
  • Follow-up run_tools_with_bash successfully read those saved /mnt/data files from the session.
  • Claude used the new fromjson? // . parsing pattern for stringified JSON output.
  • Exercised a deliberate /tmp/smoke.txt call and confirmed the tool output appended: Note: /tmp files are same-call scratch only and were not persisted; use /mnt/data for files needed later.
  • One residual behavior: when the mock payload shape was not obvious, Claude still did one raw-output inspection before using the correct .result.data[0] path. That looks like schema discovery, not a persistence or stringified-JSON handling issue.

@danny-avila danny-avila merged commit 6070edb into main May 21, 2026
4 checks passed
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