Skip to content

feat(task_step): prompt_agent sets the user-sim's persona (user_system_prompt) - #174

Open
kaihackney-scale wants to merge 1 commit into
mainfrom
kai/prompt-agent-user-system-prompt
Open

kaihackney-scale wants to merge 1 commit into
mainfrom
kai/prompt-agent-user-system-prompt

Conversation

@kaihackney-scale

@kaihackney-scale kaihackney-scale commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

A user-sim installed with install_agent, for example co-located on the solver's VM, had no way to get a persona. install_agent sets no system prompt, and prompt_agent sent the user agent only output_format and model. In a prod test with the solver and user on one VM, the uninstructed user just answered as a generic assistant ("I'm ready to help!").

prompt_agent now takes user_system_prompt. It's sent through the user-sim's agent-config extension the same way the solver's system_prompt is, with seed placeholders applied. The step fails before any turn if there's no deployed user-sim, or if the user-sim's agent-config doesn't accept system_prompt. A silently dropped persona would bring back the generic-assistant behaviour unnoticed. The field is keyword-only and serialized only when set, so existing tasks and positional callers are unchanged. The "Configured user-sim" log now lists the fields it set.

Validation: new unit tests cover delivery with the seed applied, the unset case, and both refusals, and I checked that the delivery test fails without the change. The full unit suite passes (7494), except the two test_mcp_cli_builder tests that fail the same way on main. On prod (task-kai-colocate-user-system-prompt, run from this branch), the solver was deployed and the user-sim installed on one VM with user_system_prompt set. The user opened in persona ("Hi! I'm Dana Ortiz, a product manager… write me a two-line poem about coffee") and ended the conversation once it had the poem. The same setup without it got "I'm ready to help!".

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge; no actionable issues were found.

Summary

Adds user_system_prompt so a deployed user-sim can receive a persona before the conversation starts.

  • Prompt steps can give a deployed user-sim its own persona.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["user_system_prompt set"] --> B{"Deployed user-sim selected?"}
  B -->|No| F["Fail before any turn"]
  B -->|Yes| C["Apply seed values"]
  C --> D{"Card accepts system_prompt?"}
  D -->|No| F
  D -->|Yes| E["Post user-sim configuration"]
  E --> G["Start conversation"]
Loading

Reviews (1) · Last reviewed commit: "feat(task_step): prompt_agent sets the u..." · Reviewed by Greptile

…m_prompt)

A user-sim installed with install_agent (e.g. co-located with the solver on one
VM) has no way to get a system prompt: install_agent sets none, and prompt_agent
sent the user only output_format and model, so it answered as a generic
assistant. user_system_prompt is sent through the user-sim's agent-config
extension like the solver's system_prompt, with seed placeholders applied. It
fails loudly when there's no deployed user-sim or the user-sim's agent-config
doesn't accept system_prompt. Serialized only when set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kaihackney-scale
kaihackney-scale requested a review from a team as a code owner October 12, 2026 19:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant