flue-eve

Troubleshooting

HTTP errors

CodeSymptomCauseFix
400Bad request on streamstartIndex is negative or not a numberPass a non-negative integer: ?startIndex=0
400Bad request on POSTMalformed JSON bodyValidate your request body
401UnauthorizedMissing or invalid auth tokenPass Authorization: Bearer <token> or set auth: 'none' in dev
404Route not foundPlugin not loaded or proxy not configuredVerify flueEve() is in vite.config.ts plugins array
409Conflict on follow-upStale continuationToken — turn still in progressWait for session.waiting before sending next message
410Gone on follow-upSession has ended (terminal state)Create a new session with POST /eve/v1/session
500Internal errorFlue server error or unhandled exceptionCheck Flue server logs

Dev server issues

ERR_MODULE_NOT_FOUND for @flue-eve/* or flue-eve/*

The package is not installed in your project.

npm install flue-eve

/eve/v1/health returns 404

The Vite plugin is not loaded or the proxy is misconfigured.

  1. Verify flueEve() is in vite.config.ts plugins
  2. Check that eveMount matches the URL you're requesting (default: /eve/v1)
  3. Restart the dev server

Stream never produces events

The Flue agent is not running or admission is misconfigured.

  1. Check FLUE_BASE_URL is set to a running Flue instance
  2. With mock admission (default), verify no errors in the console
  3. Try requesting health: curl http://localhost:5173/eve/v1/health

CORS errors in the browser

When running split-origin (different frontend/backend origins), add CORS middleware:

import { createEveCorsMiddleware } from '@flue-eve/compat-server'

app.use('/eve/v1/*', createEveCorsMiddleware({
  origin: 'https://your-frontend.com',
}))

For same-origin dev (Vite proxy), CORS is not needed.

Mock admission issues

Getting deterministic responses instead of LLM

Mock admission is active because no real Flue server is available.

  • Dev: Start flue dev and set FLUE_BASE_URL=http://127.0.0.1:3583
  • Production: In-process admission is used automatically when deployed together

Mock responses don't match my use case

Mock admission returns hardcoded event streams for testing. It's not a real LLM. Use loopback or in-process admission for real agent behavior.

Build and deployment issues

Build fails with TypeScript errors

Ensure all dependencies are installed and built:

pnpm install
pnpm -r run build

Cloudflare Worker: sessions lost on restart

Without persistence, sessions are ephemeral. Add KV or DO persistence:

createEveWorkerApp({
  persistence: {
    type: 'kv',
    kvNamespace: MY_KV,
  },
})

Cloudflare Worker: 500 on session start

Check that the KV or DO binding is configured in wrangler.jsonc and matches the binding name used in createEveWorkerApp.

Token and session issues

continuationToken is the same every turn

This is expected in v1. The token is stable per session. Future versions may implement per-turn rotation.

Session replay shows wrong events

The journal might be corrupted. Check persistence:

  1. In-memory: restart the server to clear the journal
  2. SQLite: delete the database file and restart
  3. Redis: flush the key prefix
  4. KV/DO: delete the KV entries or DO instance

Still stuck?

  • Check the PLAN.md for invariants and edge cases
  • Read the architecture page to understand the data flow
  • Run vp test to verify the project is in a working state
  • Install the migration skill and ask your AI coding agent for help