What does log_work do?
An agent doesn’t need to look up IDs before logging. It calls log_work directly with a description and any other details it knows. Half5 finds the client, project, and activity, or asks a question if it’s unsure.
The entry comes in as ‘Not approved yet’ under your name. That keeps you or your approver in control, even if the agent filled in the work. How to connect an agent is explained in Logging hours with Claude, ChatGPT or Cursor.
Which fields does the agent send?
Only the description is required. The rest helps Half5 pick the right client and duration. If there’s no date, Half5 books it for today. If there’s no duration, Half5 doesn’t log anything but suggests one for you to confirm. If there’s no client, Half5 only picks one automatically if there’s a clear best match.
| Field | Required | What it is |
|---|---|---|
description | Yes | A single line, 3 to 500 characters, that a client could read, in your language, with no file or class names. It may appear on an invoice. |
date | No | today, yesterday, or a date (YYYY-MM-DD). If left out, it means today. |
minutes | No | Duration in minutes, 1 to 1,440. Leave it out if the duration isn’t known. |
start_time, end_time | No | Start and end time as HH:MM. If the end time is before the start time, the work went past midnight: 9:30 PM to 1:30 AM is a single 4-hour entry on the day you started. |
customer, project, activity | No | Name, trade name, or reference. A project also implies its client. |
repository | No | Git remote, owner/repo, or folder name. Never a full local path. |
branch, commit_subjects | No | The branch and up to 10 commit subjects, as extra hints for client and project. |
session_id | No | The agent’s session ID, only if it actually knows it. |
What are the possible outcomes?
Every call ends with one of four statuses. Each one asks something different from the agent.
| Outcome | What it means | What the agent does |
|---|---|---|
created | The entry is saved, but not approved yet. | Tells you in one sentence what was logged and why for that client. |
preview | A dry run: this is what would be logged. Nothing is saved. | Shows you the proposal. |
needs_confirmation | Half5 isn’t sure, for example about the client, or the duration is missing (‘How long did you work on this?’ with a proposed duration). | Asks you the question and only logs after you choose, with exactly the option you picked. |
duplicate | The same work is already logged. | Doesn’t log it again. |
If there’s no duration, Half5 doesn’t save anything. The proposal runs, for example, from the end of your last entry today until now; you confirm or adjust it.
How does Half5 pick the client and project?
Client first, then the project within that client. Half5 weighs the hints it has and only logs right away if one client is clearly the best match. Otherwise, the agent asks you to pick from your recent client and project combinations.
- What you name. A named client or project takes priority. If two clients share the same name, for example only differing in capitalization, the exact spelling wins, then the client you’ve logged this repository on before, then the client you log on most. The agent only asks if none of those decide.
- Your repository memory. Half5 remembers for each user which repository belongs to which client, based on entries you confirmed or moved.
- The repository name. Compared with your clients’ (trade) names, labels, and email domains, and with project names.
- Your own history. Earlier descriptions that mention the repository, branch, or a ticket number, and clients you log on recently and often.
- The description, branch, and commits. Used as extra hints, not as the deciding factor.
How does repository memory work?
The memory is yours. When you log through an agent, move an entry to another client, or register agent work in the desktop app, Half5 remembers which repository belongs to which client. Next time, the agent doesn’t have to ask.
If the description clearly names a different client than your memory, Half5 doesn’t log blindly: the agent asks which one it is. With the organization setting ‘Learn from colleagues’, Half5 can also suggest a client a colleague logged the same repository on. That’s just a suggestion; the agent always asks first and your own memory comes first.
Which tools are there besides log_work?
The server offers six tools. All of them only work on your own hours, with the clients, projects, and activities you’re allowed to see in your organization.
| Tool | What it does | Limits |
|---|---|---|
log_work | Log work | New entries come in as not approved yet |
log_work_batch | Up to 25 entries in one call, for example a whole week after the fact | Each entry gets the same checks and questions as log_work; one answer to a shared client question applies to every entry asking it |
search_customers_projects | Search clients, projects, and activities by name, trade name, label, or email domain | Read-only; not needed before log_work |
list_entries | List your own entries with daily totals | Read-only; up to 31 days at a time |
update_entry | Change one of your entries | Only entries not yet approved, and only at your request |
delete_entry | Delete one of your entries | Only entries not yet approved, after confirmation |
Once an entry is approved, the agent can’t change it anymore. You do that in Half5 itself.
How Half5 does it
Under Settings → ‘Linked agents’ you’ll see each connection’s client name, whether it’s verified, when it was last used, and what it can do (view hours, log hours). ‘Disconnect’ removes its access.
The same page lists your repository memory. You can clear a single link with ‘Forget …’, or start over with ‘Forget all’. How this data is handled is explained in Privacy with AI agents. For R&D projects under the Dutch WBSO, Half5 has no dedicated WBSO export; setup instructions are in WBSO hours with software.
Frequently asked questions
Does the agent need to call search_customers_projects before logging?
No. log_work finds the client and project itself. The search tool is for questions like ‘which projects does this client have?’ or for ambiguous names.
What happens if the agent sends the same entry twice?
Half5 recognizes the same entry and returns duplicate instead of creating a second record. The agent shouldn’t log it again.
Does the agent send my code or file names?
It shouldn’t. The server clearly tells agents never to send file paths or code; the description is a single line a client could read, and the repository is sent only as a name.
Can a colleague’s memory decide which client my hours go to?
No. A colleague’s memory is just a suggestion, and only if ‘Learn from colleagues’ is turned on. The agent will always ask you first.
Can the agent still change approved hours?
No. update_entry and delete_entry only work on your own entries that aren’t approved yet. Approved hours are changed in Half5.