get_active_build
Assess the health of the build configuration index by retrieving its metadata. Use the status field to determine if a reindex is required or if the index is ready for queries.
Instructions
MANDATORY FIRST CALL for C/C++ projects. Return metadata about the most recently indexed build configuration — check index health before using any other fw-context tools.
Read-only: yes. Call at session start to check if the index exists, how many symbols it contains, and whether a reindex is needed.
Use the status field for decision-making:
"ready"— fully up to date, no issues. Continue normally."reindexing"— background reindex in progress. Index is still usable — all queries return accurate results. Continue normally."reindex_needed"— compile_commands.json changed or schema mismatch. Runfw-context index, but queries still work on existing data."no_index"— no build config indexed. Use other tools."error"— DB corruption or access error. Use other tools.
reindex_needed is True when a structural mismatch exists: schema
version outdated or compile_commands.json changed since indexing.
Modified source files are auto-handled per-query and do NOT cause
reindex_needed=True.
index_message is a human-readable summary of the index state.
When modified_files_count > 0, a background fw-context index
subprocess is spawned automatically (non-blocking, at most one at a time).
Queries continue to be served from the existing index while the new one
is being built. reindex_progress contains the last log line from
the reindex subprocess when bg_reindex_running is True.
Args: project_root: Project root directory. Auto-detected from CWD if omitted.
Returns: dict: {config_hash, project_id, project_root, build_system, compile_commands, indexed_at (ISO timestamp), symbol_count, file_count, reference_count, modified_files_count (int), header_affected_tus (int — number of TUs with stale header dependencies), manifest_verification (str — "full" when manifest.json exists, "none" otherwise), analyzed_symbols (int), unanalyzed_symbols (int — definition symbols still needing LLM analysis), analysis_model (str or None), vendor_paths (list[str] — config index.vendor_paths), project_paths (list[str] — config index.project_paths), bg_reindex_running (bool), reindex_progress (str or None — last log line when reindex is running), schema_version (int — DB schema version), current_schema (int — code expects), status (str — "ready"|"reindexing"| "reindex_needed"|"no_index"|"error"), reindex_needed (bool — structural mismatch requiring a full reindex), reindex_reasons (list[str] — why reindex is needed, empty when False), index_message (str — human-readable summary of index state)}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_root | No | Project root directory. Auto-detected from CWD if omitted. |