3.7. Configuration reference
Every session setting below is both a command-line flag and an environment variable. The flag wins. The authoritative list is the one the program prints:
$ spear-chat --help
This page groups the same settings by what they govern, and records the files they live in.
3.7.1. Files
File |
Tracked |
Holds |
|---|---|---|
|
no |
the corpus registry for this machine |
|
yes |
the template for the above |
|
no |
machine-specific environment: the one file that names what this
deployment keeps outside the checkout. Read by the launcher, by
|
|
yes |
its shape, for reading; |
|
no |
the backend chosen last |
|
no |
the served model |
|
no |
the external capability providers (External capabilities);
|
|
yes (a README) |
the rules, each applied where its header scopes it
(What a turn is shown); |
|
yes (a README) |
the skill library; |
|
yes |
the pinned inference runtime |
Important
The untracked files are the boundary between the platform and the machine. A host, an account, a card identifier or somebody’s home directory in a tracked file is a disclosure — the public-boundary tests exist to catch exactly that.
3.7.2. Endpoint and model
Flag / variable |
Meaning |
|---|---|
|
OpenAI-compatible endpoint URL |
|
|
|
model id |
|
context window in tokens (default: asked of the server, else 32768) |
|
sampling temperature (default 0.25) |
|
cap on one reply |
|
cap on one model response of a coding turn (default 16384); a response cut there is retried and then reported as truncated, never as complete |
|
Anthropic credential; an |
3.7.3. Corpora and retrieval
Flag / variable |
Meaning |
|---|---|
|
force a registered corpus |
|
treat the current directory as an ad-hoc corpus |
|
federate or drop a corpus, for one session |
|
prefix for relative corpus paths |
|
the vector store directory |
|
ssh host that embeds the corpora |
3.7.5. Permissions and execution
Flag / variable |
Meaning |
|---|---|
|
read-only; the default when no mode is given. No network |
|
confirm each edit and command, network use included |
|
run without asking; network available |
|
no network in any mode |
|
restrict writes to the launch directory |
|
accept host absolute paths into the launch directory |
|
tool calls per task (default 500, doubled for a change request unless set) |
|
model rounds per task (default 250, doubled for a change request unless set) |
|
how many times a turn may repeat an operation already refused before it is stopped (default 5) |
3.7.6. Session state and audit
Flag / variable |
Meaning |
|---|---|
|
where the session accumulates; |
|
common state, read under the user’s own and never written; unset by default, set by the image (Common and local state) |
|
operator name recorded in the audit trail |
|
start without the corpus’s stored conversation, and leave it as it is; workspace knowledge, rules and configuration still apply |
|
the workspace knowledge store (default |
|
record a runtime JSONL trace |
|
trace destination |
|
record this session’s model turns to a file |
|
replay a recorded file instead of calling the model |
3.7.6.1. The state directory
$SPEAR_STATE_DIR/
audit/
sessions/<id>/events.jsonl the turn-by-turn event stream
sessions/<id>/snapshot.json the conversation it ran on
tool-actions.jsonl metadata-only action log
runtime-trace.jsonl the runtime trace
checkpoints/ file contents captured before a mutation
standards/ the normative store
knowledge.sqlite3 workspace knowledge
rules-learned.md the rules taught with /recall
history-adhoc-<tag>.json per-corpus conversation history
<tag> is derived from the corpus root, so history follows the tree rather
than the directory you happened to launch from. A session resumes
the stored conversation of its corpus unless it is started with --fresh.
Note
Pointing SPEAR_STATE_DIR at a fresh directory gives a session that
carries nothing: no history, no workspace knowledge, no audit. That is the supported
way to get a clean run.
3.7.7. Not configuration
Many other SPEAR_* variables exist in the source. They are internal
thresholds and test hooks, not a user-facing interface, and they are
deliberately absent from --help. Treat what --help prints as the
supported surface; anything else may change without notice.
See also