Skip to content

test(evals): read-only shell-feature usage report for run_command - #541

Merged
ajianaz merged 1 commit into
developfrom
test/shell-usage-report
Nov 10, 2026
Merged

ajianaz merged 1 commit into
developfrom
test/shell-usage-report

Conversation

@ajianaz

@ajianaz ajianaz commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

What

Step 1 of #531: a read-only script, evals/shell_usage.py, that scans session JSONL and reports how often run_command / job_start inputs use shell features, and how those calls ended.

Why

run_command runs argv with no shell, so a | b, cd sub && cmd and cmd > file are 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), leading cd, and sh|bash -c wrapper; operators inside quotes are not counted. It also counts failed calls (tool_result ok=false) and calls that directly follow a failed one. Text or --json output.
  • 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.md section and CHANGELOG entry.
  • No change to 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_command calls, 5 shell-shaped (4 bash -c wrappers, 1 redirect), 0 failures. Those come from scripted Tier 2 missions that were written to use bash -c, so the sample says nothing about real use. Decision recorded here: inconclusive, leave run_command as is. The script has to be run on real daily-use sessions and live missions before choosing workdir or pipeline support, so this PR does not close #531.

Testing

  • python3 evals/test_shell_usage.py passes
  • Script runs on evals/ and docs/e8-session-log.jsonl
  • Local cora review --staged: not run (cora is not installed in this environment); the CI Cora Review job is the verdict.
  • No Rust changed.

Related Issues

Refs #531 (step 1 only). Related: #438.


Generated by Claude Code

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.
@github-actions

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

@ajianaz
ajianaz merged commit 743f07d into develop Nov 10, 2026
15 of 16 checks passed
@ajianaz
ajianaz deleted the test/shell-usage-report branch November 11, 2026 04:10
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.

feat(run_command): measure shell-feature usage first, then decide workdir / pipeline support

2 participants