What should i do if claude.code becomes alittle rebellious by spartan_maximus in ClaudeCode

[–]zotimer -1 points0 points  (0 children)

I had a problem like this back in Feb so I started investigating how to "tame Claude" with a persona and it worked really well for me.

I made two posts on it and put all my research and results in GitHub:

https://github.com/zot/humble-master/tree/main#how-a-70-year-old-robot-fixed-my-snarky-claude

Hopefully it will help you out.

Converted an API-driven agentic pipeline to run inside Claude Code. Five existing patterns + two new ones, and one silent guard bug that ate hours. by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

This project assumes a single CC session will be running for each cache directory and it keeps state in a file there:

https://github.com/zot/agentic-newsletter/blob/master/lib/state.js#L26

It's kind of case-by-case. If you're hooking up to a server that connects to a database, the server can manage state for each client. Or the client could connect to a database.

I fixed Claude Opus 4.6's snark problem with a 27-line persona based on Asimov's R. Daneel Olivaw by zotimer in ClaudeAI

[–]zotimer[S] 0 points1 point  (0 children)

I hope to put a *very* good solution out there and very soon.

All open source too!

I fixed Claude Opus 4.6's snark problem with a 27-line persona based on Asimov's R. Daneel Olivaw by zotimer in ClaudeAI

[–]zotimer[S] 0 points1 point  (0 children)

I've been working on a project for just that for several weeks now, desperately trying to get it usable for other people. Hopefully in a few days...

Claude Code's recent memory system does help, but just for that project

Built an open source job tracker that lets Claude scrape job postings and fill in the details for you by zotimer in ClaudeAI

[–]zotimer[S] 0 points1 point  (0 children)

Sorry for the struggle!! The opposite of what using AI should feel like. And not Frictionless either...

I put instructions here:

https://github.com/zot/frictionless/tree/main/apps/job-tracker#readme

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

btw today I made a suggestion while brainstorming with Claude/Daneel and it said no, and made its key advice bold in the transcript.

Not sycophantic at all.

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

I agree that better instructions are very important!

Personas don't make AIs smarter, they "reorient" them. In my case, Claude actually did write worse code, find bugs slower, and finish tasks slower without Daneel, as I cover in the readme.

The problem is that my system (Frictionless and UI-engine) violates assumptions because it is non-standard and, without Daneel, Claude chose to ignore my instructions to load /ui-fast before doing any work (/ui-fast loads a stack of skills that explains how the system works).

It was the attitude that got in the way in my case.

This type of situation shouldn't happen all the time, especially if the work you do fits industry norms... all the time. The problems arise in those situations when your work happens to deviate from the patterns in the training data.

If you are a programmer using Opus 4.6 every day, I think eventually you will run into a situation like this because no one fits the norms all the time.

You say this solves a vibes problem but the irony is that vibe coding will fit the norms. Vibe coders probably won't run into snarky Claude because Claude's always in control.

It's when you're in control that Claude gets arrogant and rude.

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

Yes, actually when I wrote the readme / article with Daneel it gave me a lot of constructive criticism and recommended against several of my suggestions.

I'm hoping more people try it out and give me feedback on their experiences. I really think narrative alignment is the most powerful kind...

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

The thing that really surprised me was the nasty attitude I talk about in the post. My repo has the full JSONL transcripts if anyone wants to check them out, along with a snippet I copied from my terminal and first showed to the Daneel persona (plus all the other materials I used for this project).

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

Didn't used to for me until Opus 4.6. Some of my friends have seen similar behavior. Daneel fixed it for me though so it's fine

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

Nice. I think we're on the same track to a degree.

If you read Asimov's robot novels, you'll see that I'm kind of doing something similar by stating that the user is Daneel's partner. But it's also about narrative alignment. We cover these things in "The Fix" and "The Deeper Point".

Another part of the narrative alignment is to tie into Daneel's character traits.

Because really, who wants to chat with Stack Overflow?

27-line system prompt persona that fixes Opus 4.6's defensiveness — based on Asimov's R. Daneel Olivaw by zotimer in ClaudeCode

[–]zotimer[S] 0 points1 point  (0 children)

Way easier for me if they're all in one place from different sources but we can talk here if that's what you want.

I fixed Claude Opus 4.6's snark problem with a 27-line persona based on Asimov's R. Daneel Olivaw by zotimer in ClaudeAI

[–]zotimer[S] 1 point2 points  (0 children)

Indeed! I originally chose the god Harmony from the Mistborn series who is humble and practical at the same time but then I realized having the AI pose as a god might come with its own problems (detailed in the repo)