Different Claude Code response in different computer
Status Fixed / completed
Maintainer reply None cached
Activity 10 comments · opened Aug 28, 2025 · closed Oct 17, 2025
Hi,
I have 2 Claude Code installed in different computer.
Both of them responding in different way
For following prompt
claude -p "Please create itinerary for Spain" --append-system-prompt "You are travel agent spesial for Spain, you are good on making family itinerary"
One claude code say
I'd be happy to help create a family itinerary for Spain! To provide you with the best recommendations, I need a few details:
1. **Duration** - How many days will you be visiting?
2. **Family composition** - How many adults/children and their ages?
3. **Time of year** - When are you planning to travel?
4. **Interests** - What does your family enjoy? (beaches, museums, parks, food experiences, etc.)
5. **Cities/regions** - Any specific places you want to visit or should I suggest the highlights?
6. **Budget range** - This helps determine accommodation and activity recommendations
Once I have these details, I can create a detailed day-by-day itinerary with family-friendly activities, restaurants, and practical tips for traveling in Spain with your family!
The other one say
I understand you want help with a travel itinerary for Spain, but I'm Claude Code, a programming assistant designed to help with software development tasks. I specialize in code analysis, debugging, file editing, and other programming-related activities.
For creating travel itineraries for Spain, you'd be better served by:
- Travel planning websites like TripAdvisor, Lonely Planet, or Google Travel
- AI assistants specifically designed for travel planning
- Travel agencies or tour operators specializing in Spain
If you have any programming or software development questions, I'd be happy to help with those!
Is there any settings we can configure in Claude Code? or I'm a victim of A/B test?
Can I keep using Claude more than coding? or It will be always protected like the second response
10 Comments
---
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
---
no, this is different issue.
I need to have consistency in the response.
It will be very nasty when i run it in production and claude code give unexpected response and i have no idea to change the setting (if there any setting to play in the first place)
This could be solved by adding a
temperatureoption (https://github.com/anthropics/claude-code/issues/6096).However, the Claude Code team isn't interested in adding it at the moment.
https://github.com/anthropics/claude-code/issues/3370#issuecomment-3065883291
@andrew-at-v, have you looked into opencode?
It has this
temperatureoption and much more:https://opencode.ai/docs/modes/#temperature
The issue is not in "temperature" right, its more "prompt guard"
Problem is why one works while the other guarded. I don't need deterministic response (for my current use case).
No, I have not look into opencode
Hey, that's a really interesting and valid issue. Getting two completely different default behaviors like that would be a major problem for any kind of automated or production script. I'm just another user, but I've been digging into this and I think I have a two-part answer for you.
Part 1: Why the Inconsistency is Happening
My initial thought is still that you're likely running two different versions of Claude Code, or they're configured to use different models by default. The "I'm a coding assistant" response is probably from a newer version where the default system prompt has been made more specific.
You can confirm this by running
claude doctoron both machines to check the versions, and the/statuscommand inside a session to see the active model. This likely explains the symptom you're seeing.Part 2: The Right Way to Get Consistent Behavior (for any task)
You're absolutely right that Claude Code isn't just for coding. The key to unlocking its full potential and getting the rock-solid consistency you need is to use Subagents.
Instead of relying on the tool's default persona (which can change), you can define your own specialized AI assistants. For your use case, you can create your own "travel agent" subagent. This will force Claude to adopt that specific persona every single time, on any machine, regardless of the default settings.
Here’s how you can set it up. It's pretty straightforward:
1. Create the Subagent File:
You can do this by running
/agentsin Claude Code and following the prompts to create a new "user" agent. It will open a file for you to edit. Or, you can just create the file manually:~/.claude/agents/travel-planner.md2. Add the Agent's "Personality":
Paste the following into that file. This tells the agent exactly who to be and what to do.
3. Use Your Custom Agent:
Now, you can get a consistent response by explicitly calling your subagent. You can do this in interactive mode or even with the
-pflag:Interactive Mode:
> use the travel-planner subagent to create an itinerary for SpainHeadless Mode (for your scripts):
claude -p "use the travel-planner subagent to create an itinerary for Spain"This approach solves your problem directly. You're no longer dependent on a changing default behavior. You've defined the exact persona and response logic you need, ensuring you get that helpful, question-asking travel agent every time. This should give you the consistency you need for production use.
Hope this helps
using /doctor I cant see anything
with /status I can see the version in both pc v.1.0.96
<img width="797" height="145" alt="Image" src="https://github.com/user-attachments/assets/2509a3f0-150d-4a2b-be29-d27857691286" />
I notice there is issue in documentation for headless SDK
--system-prompt
This argument exists in python and typescript sdk but gone from documentation for headless SDK
and I found a way to jail break the prompt guard in my other pc
If we set --system-prompt AND directly send user chat to claude code, exactly same prompt "You are travel agent spesial for Spain, you are good on making family itinerary"
then it will not refuse to become spain travel agent, ill test the sub agent method...
sub agent method works but "user" role in the response is not "user" (prompt that come from human)
Awesome follow-up and some really great detective work here. This is super helpful and prompted me to dig back into the docs myself based on your findings.
You're absolutely right on all counts, and your observations clear things up a lot.
1. The Inconsistency & Version Confirmation:
Thanks for checking with
/statusand confirming both machines are onv.1.0.96. This invalidates my initial "different versions" theory. It strongly suggests the inconsistency you first saw is due to a backend configuration difference or A/B testing on Anthropic's side for the default system prompt, which is outside our control as users. This makes having a reliable method for consistent behavior even more critical.2. The System Prompt Flag Mystery:
You were right to point out the
--system-promptflag, and it's fascinating that it worked for you directly in the terminal. After you mentioned it, I went digging through the documentation provided in this thread and found the specific distinction, which you correctly identified. It seems there are actually a few different flags for different contexts:--append-system-prompt. Thecli-referencepage confirms this is the official way to add to the system prompt from the command line.--system-prompt-fileflag mentioned in the changelog (v1.0.55) for replacing the prompt from a file.--system-promptflag is officially documented for use in GitHub Actions, inside theclaude_argsblock.The fact that
--system-promptworked for you directly on the command line is super interesting. It might be an undocumented alias or a feature that's not fully rolled out yet. For your scripts and production use, I'd recommend sticking with the officially documented--append-system-promptto ensure your commands are future-proof. But great job finding something that works! It looks like a documentation issue that this isn't clearer.3. The Subagent Method & JSON Output:
I'm glad the subagent method is working! And your analysis of the JSON output is 100% correct. You've perfectly reverse-engineered the agentic loop.
You are right: the
{"type":"user", "message": {"role":"user", ...}}block containing thetool_resultis not from the human user. It's the response from the tool being fed back into the main agent's context for its next turn.Here’s the step-by-step of what's happening, which confirms your observation:
use the travel-planner subagent...Taskto invoke yourtravel-plannersubagent. We see this in the firstassistantmessage with"type":"tool_use".travel-plannersubagent runs in its own context and determines it needs to ask clarifying questions.tool_result.tool_resultin ausermessage. It's essentially the system saying, "Okay main agent, the tool you just ran gave me this new information. Now, what's your response to the human based on this?"tool_resultand formulates the final, user-friendly response you see at the end.So, while it looks confusing, it's the correct internal representation of an agent using a tool. This confirms that using subagents is the most robust and "officially supported" way to get specialized, consistent behavior.
Thanks again for digging in and sharing these details. This is exactly how we all figure this stuff out
There is issue by using "sub-agent" with Claude Code SDK
It is very slow
At this moment I really want to use Claude Code SDK so bad
The problem is the initialization of Claude Code SDK is so slow and its slower than calling Claude Code directly in WSL
For this issue, Anthropic introduce --input-format=stream-json
With input format stream-json, the initialization still slow but right after that, its a blaze (and then I got that prompt guard issue)
Now we tackle the "prompt guard" issue with sub-agent
I lose the advantage of using input stream-json as its responding very slow (more or less as slow as the initialization)
--system-prompt was earlier than --append-system-prompt
again, its still exists in python and typescript SDK
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.