Skip to content

Reword job tag to job describe - #17496

Merged
cptpiepmatz merged 6 commits into
nushell:mainfrom
cosineblast:tag_to_desc
Mar 9, 2026
Merged

cptpiepmatz merged 6 commits into
nushell:mainfrom
cosineblast:tag_to_desc

Conversation

@cosineblast

@cosineblast cosineblast commented Feb 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR renames the job tag terminology to job describe.

This partially addresses issue #17488 but there is still discussion to be made about allowing other value types for message tags, and tag pattern matching in general.

Release notes summary - What our users need to know

  • This breaks job tag , the --tag flag in job spawn and the tag column in job list, as tag was renamed to description for these.

Tasks after submitting

[ ] Update docs


@WindSoilder

Copy link
Copy Markdown
Contributor

Hi, the CI is broken, can you fix it first?

@cosineblast

Copy link
Copy Markdown
Contributor Author

sure

@andrewgazelka

Copy link
Copy Markdown
Contributor

still one test that needs fixing @cosineblast btw

@cosineblast

Copy link
Copy Markdown
Contributor Author

yeah getting to it soon

@WindSoilder

Copy link
Copy Markdown
Contributor

Oh, there is conflict..

@cptpiepmatz cptpiepmatz added notes:breaking-changes Noted in Breaking Changes section notes:ready Indicates Ready for Release notes labels Mar 9, 2026

@cptpiepmatz cptpiepmatz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, thank you

@cptpiepmatz
cptpiepmatz merged commit ae2dd78 into nushell:main Mar 9, 2026
16 checks passed
@github-actions github-actions Bot added this to the v0.112.0 milestone Mar 9, 2026
@blindFS

blindFS commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

FYI, this breaks Atuin nushell integration

https://github.com/atuinsh/atuin/blob/84f1867a21ef229b9eaa671be3775fae3b69ac4b/crates/atuin/src/shell/atuin.nu#L40

Someone might want to fix it before the next release.

@cptpiepmatz

Copy link
Copy Markdown
Member

We should maybe reintroduce the flag as a deprecated one so that the current code still works for now

@andrewgazelka

Copy link
Copy Markdown
Contributor

hooray

@c-git

c-git commented Apr 13, 2026 •

Copy link
Copy Markdown

FYI, this breaks Atuin nushell integration

https://github.com/atuinsh/atuin/blob/84f1867a21ef229b9eaa671be3775fae3b69ac4b/crates/atuin/src/shell/atuin.nu#L40

Someone might want to fix it before the next release.

I just realized that this is what broke my setup.

Short tip for next person is to just change -t to -d.

job spawn -d atuin

See console output below from opening a new terminal (and then running nu -v)

Error: nu::parser::unknown_flag

  × The `job spawn` command doesn't have flag `-t`.
    ╭─[/home/one/.local/share/atuin/init.nu:40:24]
 39 │         if (version).minor >= 104 or (version).major > 0 {
 40 │             job spawn -t atuin {
    ·                        ┬
    ·                        ╰── unknown flag
 41 │                 ^atuin history end $'--exit=($env.LAST_EXIT_CODE)' -- $env.ATUIN_HISTORY_ID | complete
    ╰────
  help: Use `--help` to see available flags

     __  ,
 .--()°'.' Welcome to Nushell,
'|, . ,'   based on the nu language,
 !_-(_\    where all data is structured!

Version: 0.112.1 (x86_64-unknown-linux-musl)
Please join our Discord community at https://discord.gg/NtAbbGn
Our GitHub repository is at https://github.com/nushell/nushell
Our Documentation is located at https://nushell.sh
And the Latest Nushell News at https://nushell.sh/blog/
Learn how to remove this at: https://nushell.sh/book/configuration.html#remove-welcome-message

It's been this long since Nushell's first commit:
6yrs 11months 2days 7hrs 14mins 25secs 349ms 844µs 805ns 

Startup Time: 21ms 75µs 954ns

~> nu -v
0.112.1
~>

@cptpiepmatz

Copy link
Copy Markdown
Member

I wanted to add a deprecation warning, but I forgot, sorry

@c-git

c-git commented Apr 13, 2026 •

Copy link
Copy Markdown

Like happens, no worries. I included the error message in my post so hopefully it's easy for the next person to find. Not a hard fix. Just realised I didn't check on the atuin side to update. I'm a bit stretched today but we should check if a pr has already been done over there to update.

Edit: I no longer see the message I was responding to but the note that we still need to check the ation side still holds.

fdncred added a commit that referenced this pull request Oct 23, 2026
… time, and correct stale guidance in the MCP instructions and AGENTS.md (#19318)

## Description

Once `$history` was full, each new evaluation shifted every older entry
down by one. `History::push` returned the buffer length after evicting,
so an index from an earlier response could point at a later result,
while the instructions promised "indices do not shift, older ones simply
become unavailable". This PR makes that promise true: indices only
increase, and an evicted index reads as `null`. `push` also evicts until
the buffer fits the limit instead of dropping one entry per push, so
lowering `NU_MCP_HISTORY_LIMIT` trims `$history` to the new limit.

Two `evaluate` calls sent at once (agents send parallel tool calls) each
forked the same state, and the one that finished last overwrote the
other. Both responses reported the same `history_index`, and the other
call's `$history` entry and `$env` changes were lost. Evaluations now
run one at a time, like lines typed into a REPL: a lock is held from
fork to commit and released early when an evaluation is promoted to a
background job. `list_commands` and `command_help` don't wait for it.

The rest of the text `nu --mcp` sends to agents (`instructions.md`,
`evaluate_tool.md`, and the `list_commands` / `command_help`
descriptions) also gave advice that nushell contradicts. It said `ls
**/*` walks hidden directories and `glob` avoids them, when the reverse
is true. It used a `job spawn --tag` flag that was renamed in #17496,
and said `command_help` shows input/output types, which it doesn't. The
`evaluate` tool description still told agents to avoid large output,
which contradicts the server instructions sent in the same session. This
PR rewrites those passages to match nushell, tones down the all-caps
"THE RULE" section while keeping the rule and its reason, and fills in
the two short tool descriptions with their real output format and
limits.

In `AGENTS.md`, it fixes the claim that `cargo nuclippy-tests` runs all
tests (it runs clippy), says how integration-test targets are named in
crates without a `tests` target, states three wordy or hedged rules more
plainly, and fixes a typo.

## User-facing changes (Release notes)

- In `nu --mcp`, `$history` indices no longer shift when old entries are
evicted. An evicted index reads as `null`, and `$history | length`
counts every result stored in the session. Lowering
`NU_MCP_HISTORY_LIMIT` now trims `$history` to the new limit.
- `nu --mcp` now runs `evaluate` calls one at a time. Before, two calls
sent together could get the same `history_index`, and one call's
`$history` entry and `$env` changes were lost.
- The MCP server's instructions and tool descriptions now match
nushell's behavior for `ls` vs `glob` on hidden directories, `job spawn
--description`, `command_help` output, and `\u{...}` escapes.
- The `evaluate` tool description no longer tells agents to avoid large
output. Output over the limit already comes back as a `note` pointing at
`$history`.

## Additional notes
<!--
Optional.

Examples:
- fixes #123
- closes #456
- related #789

Anything else reviewers should know.
Remove this section if not needed.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:breaking-changes Noted in Breaking Changes section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

inconsistent types on --tag between job spawn and job send

6 participants