cli: the main transport falls back at the limit, too
cli_fallback = claude1, claude0 names cli delegates whose cmd and env= take over when cli_cmd answers with its limit. The main command is benched as "cli", a fallback under its own id, on the same bench the delegation uses (sp_limit_parse, sp_cooldown_until, sp_cooldown_set are now exported from libsplinter). The session key stays, so claude resumes the same conversation under the next account. With everyone benched the turn fails with the first reset, as WAIT_QUOTA ready_at=. A fallback's env= goes through a 0600 file the shell sources, not a command line. A delegate's child is benched under the delegate's id (SPLINTER_CLI_ID), never as "cli". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ca8cdb6d13
commit
808039cd58
7 files changed
+302
-21
No files matched your search
@@ -144,6 +144,15 @@ from cache and wrote 80. A command that already says `--session`, `--resume`
|
||||
or `--continue` is left alone; an exported empty `SPLINTER_CLI_SESSION` turns
|
||||
sessions off. Only the newest user message is sent - the program has the rest.
|
||||
|
||||
`cli_fallback = claude1, claude0` names cli delegates to use, in order, when
|
||||
`cli_cmd` is at its limit: their `cmd` and `env=` replace the main ones for
|
||||
that call. The main command is benched as `cli`, a fallback under its own id -
|
||||
the same bench delegation uses, so an account at its limit is skipped
|
||||
everywhere. The session key stays, so claude resumes the same conversation
|
||||
under the next account. A fallback's `env=` reaches the program through a
|
||||
0600 file the shell sources, never through a command line `ps` would show.
|
||||
When every account is benched, the turn fails with the first reset time.
|
||||
|
||||
`cli_cmd` may contain `{file}` (the prompt temp-file path) or `{prompt}` (a
|
||||
shell-quoted prompt). Without a placeholder the prompt is fed on stdin, which
|
||||
works for `claude -p`, `ollama run`, and similar tools. For CLIs that take the
|
||||
|
||||
Reference in new issue
Block a user