Repository navigation
🐛 fix(runs): make runs query --project accept a project name and filter by it - #811
Conversation
#808 🐛 fix(runs): make runs query --project accept a project name and filter by it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The promised ambiguous-name rejection path lacks automated coverage.
1 open finding
What changed in this PR
Adds project-name resolution to runs query --project while preserving UUID support.
Changes:
- Resolves exact project names to UUIDs with clear missing/ambiguous-name errors.
- Adds integration coverage for name, UUID, and unknown-name queries.
- Updates CLI documentation and specification.
| File | Description |
|---|---|
README.md |
Documents name-or-UUID project filtering. |
openspec/specs/runs/spec.md |
Specifies the new resolution behavior. |
cli/tests/runs_command_test.rs |
Tests name, UUID, and unknown-name queries. |
cli/src/commands/runs.rs |
Implements project-name resolution. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
#808 🐛 fix(runs): make runs query --project accept a project name and filter by it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
codekiln
left a comment
There was a problem hiding this comment.
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)
Three inline findings, plus one on the body.
Body: "Code: RunsCommands::resolve_project in cli/src/commands/runs.rs. Test: ... Spec: openspec/specs/runs/spec.md and the README line on -p." These three bullets say which files the change touches, which the Files tab already shows, and the names have no link or line. Cost: the reader reads a list that tells them nothing new. Rule: Trim Filler. Rewrite: delete the three bullets, and end the paragraph with "test_runs_query_project_by_name seeds runs in two projects and checks the JSON from --project <name>, --project <uuid> and an unknown name."
The body also says langsmith-sdk's read_project looks names up with GET /api/v1/sessions?name=. I could not find langsmith-sdk on this machine to check it, so please link the line in langsmith-sdk that does this.
#808 🐛 fix(runs): make runs query --project accept a project name and filter by it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)AI (codekiln-review): the three bullets ("Code: ...", "Test: ...", "Spec: ...") are gone, and the paragraph now ends with " |
codekiln
left a comment
There was a problem hiding this comment.
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)
Three findings, one on the body and two inline.
Body: "An unknown name, or a name shared by two projects, fails with a clear error instead of querying every project." Before this change a non-UUID value drew a warning and the command stopped with exit status 1 (the old spec says so, and says the v2 endpoint cannot query across all projects), so nothing ever queried every project; the sentence invents an alternative nobody proposed, and "a clear error" says nothing about the error. Cost: the reader wonders what the old behavior was and checks the diff to find out. Rules: State the Positive and Be specific and explicit. Rewrite: "An unknown name, or a name shared by two projects, stops the command with exit status 1 and a message that says which of the two happened."
#808 🐛 fix(runs): make runs query --project accept a project name and filter by it Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)AI (codekiln-review): Rewrote the sentence in the PR body to "An unknown name, or a name shared by two projects, stops the command with exit status 1 and a message that says which of the two happened." The same phrasing in the test and the spec is fixed in 32d1bd8 🩹 fix(runs): address codekiln-review round 2. |
codekiln
left a comment
There was a problem hiding this comment.
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)
One finding, on the body.
Body: the first line is "Fixes #808" and the ## from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name) header sits on line 3. Cost: the repository's AI header rule in CLAUDE.md says the header starts every PR description, so a reader who looks for the author on line 1 finds an issue reference instead. Rule: no page in the garden states it; CLAUDE.md in this repository says "Start every PR description, PR or issue comment, review comment, review body and issue body you write with the line ## from AI(<harness>, <model-slug>, <session-name>)". Rewrite: make the first line ## from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name), leave a blank line, and put Fixes #808 on the next line, before the paragraph that starts "runs query --project now takes a name or a UUID."
The code, the spec, the README and the test read correctly against the diff, and the read_project link points at lines 5517-5518 of python/langsmith/client.py at 47c553c, where params["name"] = project_name and limit is 1.
from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)AI (codekiln-review): moved the header to the first line of the body and kept |

from AI(claude-code, claude-sonnet-5-5, langstar i808-runs-project-name)
Fixes #808
runs query --projectnow takes a name or a UUID. A UUID is used as given. A name is looked up withlist_projects(GET /api/v1/sessions?name=), as langsmith-sdk'sread_projectdoes, and must match exactly one project; the runs query then filters on that ID. An unknown name, or a name shared by two projects, stops the command with exit status 1 and a message that says which of the two happened.test_runs_query_project_by_nameseeds runs in two projects and checks the JSON from--project <name>,--project <uuid>and an unknown name.🤖 Generated with Claude Code