Brokspace

Troubleshooting, metrics and bug reports

When something is slow, wrong or broken, four commands tell you why, and a fifth reports it with everything a maintainer needs.

Esta página ainda não foi traduzida; ela aparece em inglês.

When something is slow, wrong or broken, four commands tell you why, and a fifth reports it with everything a maintainer needs.

CommandAnswers
brok doctorIs everything installed and reachable? Each problem comes with the command that fixes it.
brok statusWhat is indexed, linked and running right now.
brok logs -fWhat the background brok is doing (indexing, the agent, shards).
brok statsHow searches, answers and indexing performed lately, and what failed.
brok bugA report with all of the above, secrets masked, and a prefilled issue.

Add -v (or -vv) to any command for more detail on stderr, and --json to doctor, status and stats for scripts and editors.

Common problems

SymptomLikely causeFix
brok ask says "no answer from the agent"The LLM is not running or not reachableStart Ollama or LM Studio; brok doctor shows the URL brok tries
Answers are slow to startA large local model on the CPUbrok stats shows the time to the first words; pick a smaller model with brok setup llm
Search misses recent editsThe background brok is stoppedbrok start (it follows your edits); or brok index
Search only matches wordsEmbeddings are off or the model is missingbrok model download, then brok index
Results from a linked workspace are missingThe link is not indexedbrok link list, then brok link sync <name>
Memories are not foundMemory is offbrok config get memory; brok config set memory.enabled true
"another brok process is writing the index"brok run is indexingWait, or brok stop before brok index --rebuild

Metrics

brok records how long searches, answers and indexing take, and which commands failed, in .brokspace/metrics/ (one JSON line per event, one file per month). They stay on your machine: nothing is sent anywhere.

brok stats            # the last 7 days
brok stats --days 30
brok stats --json     # for scripts and editors
Last 7 days
  search    412 searches · p50 38 ms · p95 210 ms · 6 with no results · 40 used linked workspaces · 51 found memories
  answers   37 answers · p50 14.2 s · p95 41.0 s · 2 failed · first words 3.1 s · ollama/qwen2.5-coder:7b (35)
  index     88 runs · p50 180 ms · p95 2.4 s · 1204 files indexed · last 2026-11-03 10:12
  errors    3 · ask (2), link (1)
    2026-11-03 09:58 ask: no answer from the agent. Check `brok doctor`...

What is recorded, by event:

EventFields
searchduration, hits, whether embeddings were used, hits from linked workspaces, memories
answerduration, time to the first words, provider and model, skill, success, number of earlier turns
indexduration, files scanned, indexed and removed, chunks, full run or live update
errorthe command and the first line of its message (secrets masked)

Queries, answers and file contents are never recorded. Turn metrics off with brok config set metrics.enabled false; months older than metrics.retention_days (90) are deleted when brok starts.

Reporting a bug

brok bug
brok bug --title "review hangs on large diffs" --repo brok-agent

brok bug asks for a one-line summary, then builds a report with:

  • brok's version and backends, the OS, the LLM (local or hosted, never its key), the embedding model, links, memory and daemon state;
  • the output of brok doctor;
  • the last 7 days of metrics, with the latest errors;
  • the last 60 lines of the log and your brok.yml.

Secrets are masked and your home directory shows as ~. The report is printed and saved to .brokspace/reports/; read it before you share it. brok then opens the repository's bug form with the summary and diagnostics filled in. Nothing is sent until you submit the issue on GitHub; attach the report file for the log and the configuration.

--repoFor problems with
brok (default)The CLI, indexing, search, memory, links, MCP
brok-agentAnswers, reviews, commit messages, skills on your LLM

Editors call brok bug --json (with --title, --what-happened, --context for their own versions) and open the returned url themselves. Security issues never go in a public issue: see the repository's security policy.

Nesta página