Reduced LLM turn latency with two prompt-level-only changes in server/engine.ts:
buildUserPrompt: cap recentEvents from the last 10 to the last 5 events (smaller input, less to reason over).
buildSystemPrompt: added a HARD CONSTRAINT nudging the reasoning model to keep its internal analysis brief before emitting the JSON (shortens the chain-of-thought — the 170–223s turn driver).
Reasoning stays enabled (reasoning_effort: low); only its length is limited. The deterministic stub, the TurnResult contract, max_tokens, and reasoning_effort are all unchanged.
Tests
Added 2 unit tests in server/engine.test.ts: (1) buildUserPrompt emits exactly the last 5 of N events, in order; (2) buildSystemPrompt includes the concise-reasoning constraint. 47 tests pass.
npm run typecheck, npm run lint, npm run build all green. e2e runs in CI.
Version
v0.8.0 → v0.9.0 (see CHANGELOG).
Fixes #22
## What
Reduced LLM turn latency with two **prompt-level-only** changes in `server/engine.ts`:
- **`buildUserPrompt`**: cap `recentEvents` from the last 10 to the last 5 events (smaller input, less to reason over).
- **`buildSystemPrompt`**: added a HARD CONSTRAINT nudging the reasoning model to keep its internal analysis brief before emitting the JSON (shortens the chain-of-thought — the 170–223s turn driver).
Reasoning stays **enabled** (`reasoning_effort: low`); only its length is limited. The deterministic stub, the `TurnResult` contract, `max_tokens`, and `reasoning_effort` are all unchanged.
## Tests
- Added 2 unit tests in `server/engine.test.ts`: (1) `buildUserPrompt` emits exactly the last 5 of N events, in order; (2) `buildSystemPrompt` includes the concise-reasoning constraint. **47 tests pass.**
- `npm run typecheck`, `npm run lint`, `npm run build` all green. e2e runs in CI.
## Version
v0.8.0 → v0.9.0 (see CHANGELOG).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #22
What
Reduced LLM turn latency with two prompt-level-only changes in
server/engine.ts:buildUserPrompt: caprecentEventsfrom the last 10 to the last 5 events (smaller input, less to reason over).buildSystemPrompt: added a HARD CONSTRAINT nudging the reasoning model to keep its internal analysis brief before emitting the JSON (shortens the chain-of-thought — the 170–223s turn driver).Reasoning stays enabled (
reasoning_effort: low); only its length is limited. The deterministic stub, theTurnResultcontract,max_tokens, andreasoning_effortare all unchanged.Tests
server/engine.test.ts: (1)buildUserPromptemits exactly the last 5 of N events, in order; (2)buildSystemPromptincludes the concise-reasoning constraint. 47 tests pass.npm run typecheck,npm run lint,npm run buildall green. e2e runs in CI.Version
v0.8.0 → v0.9.0 (see CHANGELOG).