Files
Worktrunk Bot 350ad764ef skills(running-tend): fix the statusline cache-check recipe for Linux (#3825)
The `running-tend` skill's weekly statusline cache-check recipe can't
run as written: its `sed -i ''` is BSD syntax, and the weekly job runs
on `ubuntu-24.04`. GNU sed reads the `''` as the script and the
substitution expression as a filename, so the step exits 2 and the input
file keeps its `REPLACE_WITH_CWD` placeholder — a session that pushed
past the error would then profile a statusline render against a
nonexistent working directory. Building the JSON with `jq -n --arg`
drops the placeholder dance entirely and can't be corrupted by a path
containing a quote.

The same block also invoked `wt list statusline --claude-code`, which
has been deprecated in favour of `--format=claude-code` since #2436 and
warns on every use.

<details><summary>Verification</summary>

GNU sed 4.9 on this runner, reproducing the failure:

```
$ sed -i '' "s|REPLACE_WITH_CWD|/home/x|" sedtest.txt
sed: can't read s|REPLACE_WITH_CWD|/home/x|: No such file or directory
exit=2
```

The corrected recipe, run end to end against a debug build of this
checkout:

```
$ jq -n --arg cwd "$PWD" '{hook_event_name:"Status", workspace:{current_dir:$cwd}, model:{display_name:"Opus"}, context_window:{used_percentage:42.0}}' > /tmp/statusline-input.json
$ wt -vv list statusline --format=claude-code < /tmp/statusline-input.json > /dev/null
exit=0
$ wt config state logs profile --format=json | jq .cache
{"same_context_duplicates": [...], "same_context_extra_calls": 2, ...}
```

The field names match what `StatuslineInput` reads —
`/workspace/current_dir`, `/model/display_name`,
`/context_window/used_percentage` in `src/commands/statusline.rs`.

Deprecation warning on the old flag:

```
$ wt list statusline --claude-code < /tmp/statusline-input.json
▲ --claude-code is deprecated; use --format=claude-code instead
```

No regression test: the change is to a skill markdown file, which has no
test harness in this repo. The recipe itself was run end to end instead,
as above.

</details>

Found by the nightly survey (`.claude/skills/` is not on the rotation,
but the statusline recipe surfaced while checking `wt list statusline`
doc accuracy in `skills/worktrunk/reference/claude-code.md`).

---------

Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
2026-08-17 01:48:23 -07:00
..