Skip to content

The chat never warms a CLI agent before the first question, and the change that built it still reads as not started #953

Description

@rubenvdlinde

What happens

The warm-start-and-cli-step-visibility change is built and tested, but its tasks.md has all four boxes unchecked. One of its promises is also not kept: nothing calls the warm-up, so the first question to a CLI-mode agent still pays the cold start.

What the code has

All four tasks exist on development:

Task Code Test
1. warmAnthropicCli() ProviderFactory.php:1711 tests/Unit/Service/Llm/ProviderFactoryTest.php
2. chat#warm ChatController.php:179, routes.php:517
3. RunStepBus RunStepBus.php, used by ChatStreamController tests/Unit/Service/Engine/RunStepBusTest.php
4. Both warm-up outcomes ChatControllerTest::testWarmWithoutIdentifiersIsNotAnError (:590), testWarmSwallowsAFailedLookup (:612)

So the tool steps a CLI turn runs do show live in the chat (matrix row ch-tool-steps, "yes").

What is missing

Task 2's acceptance criteria say the warm-up is "called when the chat opens or an agent is picked, not on the first question". Nothing calls POST /api/chat/warm: a grep for warm under src/ finds no caller, and nextcloud-vue 2.55.1's companion has no call to it either. The endpoint answers 200 and is never reached.

Fix direction

  1. Call POST /api/chat/warm from Chat.vue when the page opens and when the agent changes. Consider asking nextcloud-vue to do the same in CnAiChatPanel for the companion.
  2. Tick tasks 1, 3 and 4 in openspec/changes/warm-start-and-cli-step-visibility/tasks.md. Tick task 2 once the caller lands, then archive the change.

Live check

  1. With an agent on anthropic and executionMode: cli, open /apps/hermiq/chat and pick the agent.
  2. In the browser's network tab, no POST .../api/chat/warm is sent.
  3. Send a first question and note the delay before the first token, against a second question in the same session.

Matrix row: ch-tool-steps (its note records the unchecked tasks).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenspecManaged by OpenSpec workflow

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions