Repository navigation
test(evals): read-only shell-feature usage report for run_command - #541
Merged
Merged
Conversation
Scans session JSONL and counts pipes, chains, redirects, substitutions, leading cd and bash -c wrappers in run_command/job_start inputs, with failure and retry signals. No runtime change.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
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.
What
Step 1 of #531: a read-only script,
evals/shell_usage.py, that scans session JSONL and reports how oftenrun_command/job_startinputs use shell features, and how those calls ended.Why
run_commandruns argv with no shell, soa | b,cd sub && cmdandcmd > fileare literal characters. Whether that costs agents turns is unknown for tole: there is no data. #531 asks to measure before changing anything.Changes
evals/shell_usage.py: scans any directory or file recursively for*.jsonl(one entry per line or batched arrays). Per call it records the categories pipe, chain (&&||;), redirect, substitution ($(/ backtick, not inside single quotes), leadingcd, andsh|bash -cwrapper; operators inside quotes are not counted. It also counts failed calls (tool_resultok=false) and calls that directly follow a failed one. Text or--jsonoutput.evals/test_shell_usage.py: 4 tests (feature table, quoted operators, unparsable input, a scan with a batched line, an ignored tool and a bad line).evals/README.mdsection and CHANGELOG entry.run_command, tole-core or tole-cli.Result of the first run (2026-11-10)
All session files in this repository: 8 files, 9
run_commandcalls, 5 shell-shaped (4bash -cwrappers, 1 redirect), 0 failures. Those come from scripted Tier 2 missions that were written to usebash -c, so the sample says nothing about real use. Decision recorded here: inconclusive, leaverun_commandas is. The script has to be run on real daily-use sessions and live missions before choosingworkdiror pipeline support, so this PR does not close #531.Testing
python3 evals/test_shell_usage.pypassesevals/anddocs/e8-session-log.jsonlcora review --staged: not run (cora is not installed in this environment); the CI Cora Review job is the verdict.Related Issues
Refs #531 (step 1 only). Related: #438.
Generated by Claude Code