Bug: Cannot save edited prompt back to Prompt Hub after opening trace run in Playground

Bug Description

When opening a trace run in Playground and editing the system prompt, it’s impossible to save the changes back to an existing prompt in the Prompt Hub.

Steps to Reproduce

  1. Go to Tracing and open a trace run that produced undesired output
  2. Click “Open in Playground” on that run — Playground loads with the exact inputs, messages, tools, and model config from the trace
  3. Edit the system prompt to fix the issue
  4. Click Save → the “Save prompt” dialog appears
  5. Type the name of the existing prompt (e.g. agent_review)
  6. Result: Error message — “A prompt with this name already exists” — and the Save button is disabled entirely

Expected Behavior

Typing an existing prompt name should save the changes as a new commit to that prompt (same as client.push_prompt() in the SDK), not block the Save button.

Workaround Attempts

Using “Load prompt” first resets all messages, tools, and model config — losing all context loaded from the trace, which defeats the entire purpose of the “Open in Playground from trace” workflow.

Impact

The core workflow of “Open trace in Playground → edit prompt → save back to Hub” is completely broken for existing prompts.

GitHub issue: Bug: Cannot save edited prompt back to Prompt Hub after opening trace run in Playground · Issue #2671 · langchain-ai/langsmith-sdk · GitHub

Thanks for the report! I’ve forwarded this to the prompt engineering team for a fix.