Context Chat 5.4.0: initial indexing remains incomplete, but newly created files are indexed

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.8.2
  • Operating system and version (e.g., Ubuntu 24.04):
    • TrueNAS SCALE Linux 6.12.99-production+truenas
  • Web server and version (e.g, Apache 2.4.25):
    • Nextcloud AIO Apache container
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Caddy reverse proxy in Nextcloud AIO. Cloudflare is used in front of the instance.
  • PHP version (e.g, 8.3):
    • 8.3.33
  • Is this the first time you’ve seen this error? (Yes / No):
    • no
  • When did this problem seem to first start?
    • After an AIO upgrade in August 2026. The Context Chat backend and app were subsequently updated/redeployed, but the incomplete initial file-indexing state did not recover.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Nextcloud AIO on TrueNAS SCALE using Docker.
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • Yes, Cloudflare.

Summary of the issue you are facing:

Context Chat 5.4.0 reports that initial indexing is incomplete, but it does not crawl the existing file tree. Newly created or modified files are indexed successfully.

Context Chat Backend reachable: Yes
Total eligible files: 10527
Files in indexing queue: 0
Locked files in indexing queue: 0
New files in indexing queue (without updates): 0

Queued documents:
files__default => 0

Indexed documents:
files__default => 35
mail__mail => 5411

Actions in queue: 0

File system events in queue: 0

The backend is reachable and functional. Existing files from before the problem are not crawled; new files are detected and indexed. The initial full crawl appears not to be scheduled.

Relevant Context Chat state:

json { "backend_init": "true", "installed_time": 1770663674, "last_indexed_time": 0, "providers": "{\"files__default\":{\"isInitiated\":true,\"classString\":\"\"},\"mail__mail\":{\"isInitiated\":true,\"classString\":\"OCA\\\\Mail\\\\ContextChat\\\\ContextChatProvider\"}}", "indexed_files_count": "7256" }

`last_indexed_time` remains `0`, while no file queue, `SchedulerJob`, or `StorageCrawlJob` exists. I do not want to reset/delete Context Chat Backend data. Mail documents are indexed, the backend is reachable, and new files index successfully. Removing backend data could destroy the existing index without recreating the missing initial crawl.

Steps to replicate it (hint: details matter!):slight_smile:

1. Install and configure Context Chat plus Context Chat Backend in Nextcloud AIO.

2. Allow initial indexing to begin.

3. After an interrupted or failed initial indexing period, Context Chat remains incomplete with `last_indexed_time = 0` and no file queue.

4. Disable and re-enable Context Chat: `

bash php occ app:disable context_chat php occ app:enable context_chat

5. The provider becomes initialized:

json "files__default": { "isInitiated": true, "classString": "" }

6. Create a new text file using the Nextcloud Files web interface.

7. The new file is indexed; in my case `files__default` increased from 33 to 35.

8. Existing files are still not crawled and the initial indexing state remains incomplete.

What I verified

Nextcloud Server: 33.0.8.2
AIO version: v13.6.0
AppAPI: 33.0.0
Nextcloud Assistant: 3.5.0
Context Chat: 5.4.0
Context Chat Backend: 5.4.1-cuda
Context Agent: 2.8.0

The backend answers heartbeat, initialization, trigger, and document-count requests.

Relevant Context Chat jobs:

OCA\ContextChat\BackgroundJobs\RotateLogsJob OCA\ContextChat\BackgroundJobs\FileSystemListenerJob

There is no `context_chat:scan` command in Context Chat 5.4.0.

Code-path observation

I inspected the installed Context Chat 5.4.0 code. `AppInstallStep.php` adds `SchedulerJob` only when `installed_time` is `0`:

php if ($this->appConfig->getAppValueInt('installed_time', 0, lazy: true) === 0) { $this->appConfig->setAppValueInt('installed_time', time(), lazy: true); $this->jobList->add(SchedulerJob::class); }

`SchedulerJob` creates `StorageCrawlJob` entries for mounts with `last_file_id = 0`:

php foreach ($this->storageService->getMounts() as $mount) { $this->jobList->add(StorageCrawlJob::class, [ 'storage_id' => $mount['storage_id'], 'root_id' => $mount['root_id'], 'overridden_root' => $mount['overridden_root'], 'last_file_id' => 0, ]); }

Because `installed_time` is set, disable/enable does not schedule another `SchedulerJob`. I cannot find a supported recovery method for an incomplete initial crawl where the original scheduler/crawl jobs are absent.

Questions

1. Is `last_indexed_time = 0` with no file queue, `SchedulerJob`, or `StorageCrawlJob` a known Context Chat 5.4.0 incomplete-index state?

2. What is the supported recovery procedure to restart the initial crawl for existing files?

3. Is there an official OCC command, repair step, or AppAPI operation to create the equivalent of a new `SchedulerJob`/`StorageCrawlJob` sequence?

4. Is manually adding one `OCA\ContextChat\BackgroundJobs\SchedulerJob` through `IJobList` supported, or is there a safer recovery method?

5. Is a `context_chat:recrawl` or `context_chat:reindex` command planned?

Context Chat Backend

The backend is reachable and returns successful heartbeat/init/trigger/count requests.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

Not primarily a browser issue. The failure is visible in Context Chat OCC status and background-job state. The Files web interface works, and newly created files are indexed.

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

No relevant Apache, Caddy, or Cloudflare errors have been identified.

Configuration

Context Chat

{ "embedding_model": "nomic-embed-text", "enabled": "yes", "workers": "4", "installed_version": "5.4.0", "backend_init": "true", "installed_time": 1770663674, "last_indexed_time": 0, "indexed_files_count": "7256" }

Embedding and LLM endpoint addresses were omitted because they expose internal network topology. They are reachable OpenAI-compatible endpoints.

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

PASTE HERE

Apps

The output of occ app:list (if possible).

app_api: 33.0.0 assistant: 3.5.0 context_chat: 5.4.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.