---
title: "Retainer hours: how to see what is left this month"
description: "Set the monthly hours as a quota on the project, log time against it, and ask for the balance. The server returns quota, logged and remaining, already summed."
url: https://socienne.com/articles/retainer-hours-left
author: Patrick Heneise
publisher: Socienne
published: 2026-11-26
kind: article
---

# Retainer hours: how to see what is left this month

To see what is left on a retainer, put the included hours on the project as a quota and log time against that project. Then ask for the balance, and the server returns the quota, the hours logged and the hours remaining for the period, already summed.

The usual version of this is a spreadsheet. A client asks "how many hours do we have left this month?" and the answer depends on whether someone updated the sheet on Friday. This page shows how Socienne keeps that number in the record instead, with one made-up example.

## What does a retainer record hold?

In Socienne, a retainer is the fee agreement on a project. You add it through Claude with `add_retainer`. It holds:

| Field | What it means |
| --- | --- |
| `period` | Weekly or monthly |
| `included_minutes` | The time included per period. 20 hours is 1200 |
| `amount_cents` and `currency` | The fee per period, in whole cents |
| `starts_on` | The first day the retainer covers |
| `note` | Free text, such as what the retainer covers |

A retainer logs no time. Time comes from time entries on the project.

A retainer's terms never change after you add it. To change the hours or the fee, you add a new retainer with a later start date. The current one then ends the day before the new one starts. You can still edit the note or set an end date.

To ask which retainer applies on a day, the assistant uses `list_retainers` with that date. A retainer that has not started yet is listed with its start date, not as in effect.

## Where does the "hours left" number come from?

From the project's quota, not from the retainer.

`get_quota_status` reads the quota you set on the project: `quota_minutes` and `quota_period`. It does not read the retainer's `included_minutes`. So when you add a retainer of 20 hours a month, also set the project's quota to 1200 minutes, monthly. Then the two records agree, and the balance means what the client thinks it means.

Today these are two records. Keep them in step when the terms change.

## Fixed or rolling: which quota mode?

A quota has two modes.

| | Fixed | Rolling |
| --- | --- | --- |
| Each period | Starts fresh | Starts with what the last period carried over |
| Unused hours | Lost at the end of the period | Added to later periods |
| Hours over | Do not affect the next period | Reduce later periods |
| Extra setup | None | A start date (`quota_anchor`) and an optional opening balance |
| Periods | Daily, weekly or monthly | Daily, weekly or monthly |

Pick the mode your agreement with the client says. If unused hours roll over, use rolling. If they do not, use fixed.

In rolling mode, `get_quota_status` walks every period from the start date and returns the last 26 periods. Each one shows its quota, what carried in, what was logged and the balance carried out.

## A worked example

Northwind and every number here are made up.

Northwind pays a monthly retainer for 20 hours. The project "Northwind retainer" has a fixed monthly quota of 1200 minutes. By November 20, the team logged 14 billable hours on it.

The owner asks Claude: "How many Northwind hours are left this month?" Claude calls `get_quota_status` for the project. The server returns:

| Field | Value |
| --- | --- |
| `quota` | 1200 |
| `logged` | 840 |
| `remaining` | 360 |
| `remaining_text` | 6 h 0 min |

Claude reads back "6 hours left this month." The server formats the hours itself, so the assistant never divides minutes by 60.

`logged` counts billable minutes, and overlapping entries count once. That is the same basis as the time total for one project (`get_time_total`).

## What happens when the hours run out?

Nothing stops anyone from logging time. Socienne does not refuse a time entry because a quota is used up.

The balance goes below zero instead. With 22 hours logged in our example, `remaining` would be -120 and `remaining_text` would read "-2 h 0 min". In rolling mode, an over period reduces the periods after it.

What happens to the extra hours is up to you and your client. The quota is a budget report. It does not change time entries or rates.

## What if the retainer terms change mid-year?

Add a new retainer for the new terms. Then update the project's quota to match.

Be careful with the quota change. Socienne applies the current quota terms to every past period. If you change `quota_minutes`, `quota_period`, the start date or the opening balance, past balances are restated under the new terms. In rolling mode, that changes what carried over.

If you need the old balances, ask Claude for the current `get_quota_status` result and keep a copy before you change the quota.

## Can the client see the balance?

Not from Socienne directly. These tools are open to the business owner. Socienne does not send the balance to anyone. The owner reads it in Claude and passes it on.
