Repository navigation
fix(deprecate): warn on --claude-code flag and wt hook post-create alias - #2436
Merged
Merged
Conversation
…` alias Both surfaces previously mapped silently to their replacements, so users had no signal to migrate before removal. Emit per-invocation warnings matching the existing `wt select` / `--no-verify` / `wt hook approvals` pattern. The config-section `[post-create]` warning is unchanged (separate path, already errors at load). Co-Authored-By: Claude <[email protected]>
worktrunk-bot
left a comment
Collaborator
There was a problem hiding this comment.
Both new branches (if claude_code in handle_list_command and the args.first() == Some("post-create") check in handle_hook_command) lack test coverage, so codecov/patch is likely to fail. The closest precedent is test_switch_no_verify_deprecated_still_works (tests/integration_tests/switch.rs:863) — a similar smoke test that asserts stderr contains the deprecation string would cover both new code paths.
Smoke tests that assert each deprecated CLI surface (1) still works and (2) emits the deprecation warning to stderr with the migration hint. Modeled on test_switch_no_verify_deprecated_still_works. Addresses auto-reviewer feedback on #2436 (codecov/patch coverage gap on the two new branches). Co-Authored-By: Claude <[email protected]>
worktrunk-bot
approved these changes
Apr 27, 2026
10 tasks
max-sixty
pushed a commit
that referenced
this pull request
Aug 17, 2026
…#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 <[email protected]>
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.
Both surfaces previously mapped silently to their canonical replacements, so users had no signal to migrate before eventual removal. Emit per-invocation warnings to stderr matching the existing pattern used by
wt select,--no-verify, andwt hook approvals.The config-section
[hooks.post-create]warning path is unchanged — that already errors at config load (#2361). This only adds a warning for the bare CLI aliaswt hook post-create, which still maps topre-startafter warning.One UX consideration:
--claude-codeis read on every Claude Code statusline redraw, so users with the deprecated form in their statusline integration will see the warning each redraw until they migrate. That's the intent (surface the deprecation), but worth noting.Co-Authored-By: Claude [email protected]