In Interstellar, TARS has a configurable humor setting. Cooper runs it at 75%. It’s played for laughs, but it’s also one of the more honest things in the film: personality as a dial, mood as a parameter.

I gave Claude Code the same feature.

My AI coding assistant runs with a UserPromptSubmit hook — a small script that fires on every prompt and injects context into the conversation. It was already injecting the current date and time. I decided to also inject a humor percentage, dynamically computed from the hour of day:

DATE: 2026-03-07 1813 HUMOR: 35%

The schedule is straightforward. During the work day — 9 to 5 — humor stays low: 12–15%. You’re trying to get things done; a wisecracking assistant isn’t an asset. At lunch it ticks up slightly. After 5 it climbs into the 35–55% range. Late evening hits 55–75%. The truly ungodly hours — 2 to 6 AM — top out at 85%, because if you’re writing code at 3 AM something has already gone wrong and you might as well have someone to commiserate with.

The hook also only fires once per hour. After the first prompt, subsequent prompts in the same hour get a bare continue: true with no context injected. The model already knows what time it is.

I showed this to Claude and asked if 85% was enough to get the TARS reference.

TARS: “I have a joke.” Cooper: “Tell me.” TARS: “DATE: 2026-03-07 1813 HUMOR: 35%” Cooper: “That’s not funny.” TARS: “Not at this setting, no.”

I laughed out loud, literally, at 6:13 PM on a Saturday. That puts the humor system at approximately 35% by the schedule, which seems about right for that joke.

The behavior change is real, if subtle. I’ve tested this with explicit CLAUDE.md entries at the cost of permanent context — the model does shift. Not dramatically; it won’t start opening with puns at 85%. But the tone loosens slightly, responses get a little less clipped, and if you’re already being playful it meets you there instead of maintaining professional distance. The effect is proportional to how much you lean into it. It’s less a personality transplant than a posture adjustment.

Which is, when you think about it, exactly how it works for people too.

TARS sets humor to 75%. I set mine to whatever time it is. Cooper would approve.

Claude has not added any bugs to my code as practical jokes. So far.