"ready_at=9223372036854775807" in a provider's limit text was parsed with
strtol, stored as a cooldown and honoured: choose() then skipped that
delegate on every call and said nothing about it. On machine here that
would have wedged the delegate for good, from one unlucky answer.
A reset beyond LIMIT_MAX_AHEAD (370 days) is not a reset, so sp_limit_parse
drops it and the default one-hour bench applies. sp_cooldown_until does the
same with the file: it is plain text in a directory other runs can write,
so a value that is not a plausible time is not a bench either.
Test: tests/test_delegate.c feeds the absurd ready_at and asserts the bench
stays within two hours, a plausible ready_at is kept exactly, a cooldown
file holding LONG_MAX and a text line reads as no bench, and a real
sp_cooldown_set is still honoured. Red before the fix (until <= now + 2h,
sp_cooldown_until == 0), green after.
Everything that was uncommitted in the shared tree, in one commit because the
changes are interleaved across the same files (lcm, engine, frontend, locales).
lcm: a continuation prompt is not the task. After /resume the newest user
message is "Continue with the task ...", and pinning it kept the keystroke
while the question it continues was cut away -- measured: a resumed session
woke up with the prompt, one tool call and its error, and no task at all. The
pin now skips the harness's own continuation prompts, so the real question is
pinned again. test_compactor drives it: with the skip disabled the task is
lost (red), with it the task comes back after the summary (green).
engine: /self-check and the exact tool-argument parse are in a1794fb; this
commit carries the tests for them (a failed tool observation must appear in
the self-check prompt; mcp_parse_exact rejects two objects in one string) and
the i18n keys the new code uses: cmd.script.*, main.no_profile, tg.busy,
tg.interview.running, ui.agent_busy in all three catalogues.
The rest is the in-flight work from the shared session: engine/frontend,
plugins, telegram/a2a, and their tests.
make check: all tests passed; check_i18n ok, 204 keys in 3 catalogues.
- plugins/tmux, plugins/planner and plugins/sysinfo are gone (plugin list,
Makefile rules, tests, docs). The config no longer loads them; the stale
.so files were removed from the install tree.
- plugins/tasks is plugins/processes: plugin name "processes", widget
"processes", tools process_start/process_list/process_result/process_kill.
The sidebar now lists only running work: a finished task keeps its output
in process_result but stops taking a row forever.
- the dead planner link in the delegate (link_plan_quota -> command "tasks")
is removed with the planner.
- tool call rows are no longer capitalised: "run ls -l", "read src/x.c" as
the model sent them, not "Run "/"Read ".
- tests updated (delegate panel expects no finished row, engine/UI expect the
lowercase call row, secrets/delegate use the processes plugin and tools).
- the user's config gets a Delegate/Scheduler section: the three providers
carry review/plan/docs tags and keep max_parallel=2; plugin scheduler stays
loaded so waiting jobs are retried.
make check: all tests passed.
plugin NAME { path = ... enabled = false key = value } loads the plugin
(shipped one for NAME unless path says otherwise) and hands everything else
to that plugin as its configuration, read with sp_host_plugin_config() or
walked with sp_host_plugin_config_at(). Nested blocks give dotted keys,
lists arrive comma-separated.
The mcp plugin's servers are now server ID { url | cmd | header } blocks
inside plugin mcp { }; the old top-level mcp NAME { } and the flat
plugin = path / plugins = [ ... ] forms keep loading.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Substring matching made 'cli' match 'client' and never matched 'gross' to 'big'.
Words now, with German/English synonyms; a private task only goes to a private
delegate; when no tag fits the config's default takes the task.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Config: { } blocks (core, telegram, provider, pool, exit) translated to the flat
reader with source line numbers; flat form still loads; delegate/plugin limits
raised. Pools: failover/balance, used by delegation (tag-safe), by -m and for
the conversation when its provider hits a limit. -m SEL picks a pool, provider,
provider/model or model name; --model-list lists them with served models.
Usage limits: the agent finds the reset and waits (UI: Ctrl-C stops, /resume
goes on; on_limit=fail turns it off).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Markdown tables are drawn as columns now (src/md.c, test_md, and a case in
test_ui.sh that checks the screen). The site counts lines, tools, tests,
plugins and palettes from the tree instead of naming them; the binary-size
figure is gone because it aged with every build.
The delegate panel cycle has a test (host + tasks plugin, widget says
delegate:panel exit 0), and the turn loop is driven with lcm at 8 KiB and
32 KiB budgets, so compaction is measured rather than claimed.
swarm, provstate and planner get smoke tests. TODO.md is rewritten against
the tree: the step limit was the old default (8 -> 150), skills and memory
were already built, and the open points are claude exit 2, a real Telegram
approval, A2A, the npm leftovers and the scheduler/job tests.
A parallel child that answers with its limit benches its delegate, like
the single call, and its task is spawned again in the same slot on the
next delegate that fits - the request's tags plus the benched one's -
while the other tasks keep running. A fallback already at its
max_parallel among the running jobs is not taken. The task header says
what happened.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cli transport keys the program's own session on SPLINTER_CLI_SESSION
(the splinter session id, plus ':<delegate>' for a delegate child):
claude gets a derived UUID, --session-id first and --resume after, with
one retry when claude disagrees; opencode gets --session ses_<derived>;
other programs can use {session} and {uuid}. Consecutive calls continue
one conversation and hit the provider cache (measured: 17.6k read, 80
written on the second call).
A delegate whose answer is a limit (429, rate/usage/weekly limit, quota)
is benched until the reset it names - claude's "resets 3am
(Europe/Lisbon)" is read through date(1) - in ~/.splinter/cooldown/<id>,
and the task goes to the next delegate that fits. choose() skips benched
delegates, also when one is asked for by name.
run_child now carries the tail of the child's output in its error and
treats a signal as failure; "exited 1" alone hid every limit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
env=NAME=VALUE on a delegate line (repeatable) is set in the child right
before exec and beats what the parent exported, so two delegates can run
the same cli with two accounts. Remotely it goes in front as
`env 'NAME=VALUE'`, quoted like the rest. cli_env = NAME=VALUE does the
same for the main cli transport. A bad name is an error with the line.
Also in this commit, the work in progress from the tree: swarm and
provider state, the provider/scheduler/planner/tmux plugins, the ui test,
whose tmux session name is now per run so parallel runs do not collide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A review found the tool classes - the core of the harness - bypassable in
several places where model output was pasted into a shell or trusted as an id.
Each fix below has a test that reproduces the original failure.
No shell for model data
- webfetch put the URL between '...' and ran it through popen: a quote in the
URL ran any command, from a tool that needed no consent. curl is now exec'd
with an argv, http(s) only, HTML stripped in C, stderr off the curses screen.
- webfetch is mutate: with read free, "read a key, fetch evil/?k=..." left the
machine without anybody being asked. websearch stays read (fixed host).
- kids: the parent-approval command got the model's arguments inside '...'
via system(); they are now "$1". The domain check reads the URL with the
same parser as the tool (duplicate keys) and refuses user@host URLs.
- delegate: the two copies of the child argv are one (exec_delegate). The ssh
path exec'd splinter with "ssh" as argv[0]; it now runs ssh and quotes every
word for the remote shell. A single delegate to a host now really runs there.
Approvals (ack)
- The id was the pid: a late yes stayed on disk and approved the next request
unseen. Ids are random, requests 0600 with O_EXCL, deleted when answered or
expired; an answer is refused after expiry; the first answer wins (link(2)).
- An ack dir owned by someone else or writable by others is refused.
- --ack accepted every word but "no" as yes ("nein" approved). Now strict.
- The terminal thread blocked in fgets after a phone answer; it is stoppable.
Secrets
- API key and Telegram token were in curl's argv, readable via ps. src/curl.c
passes URL and auth headers as a -K config on stdin (transport, telegram,
tg-ask.sh; its dead eval fallback is gone).
- 'run' and task_start no longer inherit splinter's keys ("run env"). 'run' got
its own process group, stdin /dev/null and SPLINTER_RUN_TIMEOUT (300 s).
MCP server
- Beyond 127.x it refuses to start without SPLINTER_MCP_TOKEN; connections
must begin with "AUTH <token>". SIGPIPE ignored, idle connections closed.
Crashes
- task_kill sent kill(-0) - SIGTERM to splinter's own process group - because
popen gave no pid. Tasks now have a pid and a process group; integer ids work.
- ui: a 3- or 4-byte UTF-8 character overflowed char[2] on every redraw
(now sp_ui_ascii_char, tested); the scroll offset was taken from one buffer
and applied to another, reading past its end.
Repo
- The test binaries are no longer tracked (.gitignore already said so).
make check: 23 test binaries, green, also under ASan/UBSan.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OLLAMA_KEY, OLLAMA_KEY_0.._N and CLAUDE_CODE_OAUTH_TOKEN, _0.._N are enough to
fill the harness: every Ollama key becomes a delegate and an exit in the ring,
every Claude token becomes a cli delegate running 'claude -p'. Several keys mean
several accounts; the ring walks them.
That is the workflow the tool exists for - a strong model plans and defines the
work, the local models implement it, delegate is the handover:
OLLAMA_KEY=... CLAUDE_CODE_OAUTH_TOKEN=... splinter --choose 'plane die arbeit'
claude-3 score=4 prio=10 task mentions 'plan'
OLLAMA_KEY=... splinter --choose 'implementier das'
ollama-2 score=3 prio=0 task mentions 'implement'
Delegates also take prio (tie-break, higher wins) and max_parallel (default 1,
a busy delegate says so instead of queueing silently). kind=cli with cmd=... runs
a program instead of an endpoint.
Keys travel in the environment, never on a command line or into a log.
test_config covers the scan, test_delegate the prio tie-break.
A delegate is a line in the config - id, what it is good at, tags, endpoint,
model. No profiles: a profile is a directory of files, and this needs a line you
can read at 2 a.m.
The delegate tool takes a task and optional tags. The pick is code, not a guess:
requested tag 5, tag in the task 3, description word 1, ties to the earlier
entry. The observation opens with the choice and the reason, and --choose prints
the same decision without running anything:
coder 7 task mentions 'code'
quick 5 task mentions 'chat'
coder 3 task mentions 'refactor'
The child is splinter itself in one-shot mode - same tools, own context, own
endpoint and model. Classed destructive, because it runs a whole agent; the
operator approves the delegation once.
test_delegate pins the decisions, including the two cases that must not pick
anything: no matching tag and no delegates at all.