nextlevelbuilder / nextlevelbuilder/goclaw

[Lite v3.9.0] Every chat blocked — "hook blocked user_prompt_submit" due to missing hooks/hook_agents tables

Open
#977 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

agent:github-maintain area:data-store area:desktop bug maintain:bug-confirmed maintain:triaged P0-critical
Dominant language
Go
Stars
3.6k
Forks
1.1k
Avg merge
3d 5h
Merged PRs (30d)
24

Description

Summary

After upgrading to GoClaw Lite v3.9.0, every chat request (dashboard, Telegram, API) immediately fails with setup context: hook blocked user_prompt_submit. The LLM is never called — traces show 1 ms duration, 0 LLM spans.

Symptoms

  • All chat completions fail instantly with no LLM call
  • Trace detail shows 1 ms duration, 0 LLM spans
  • Dashboard chat returns error message instead of AI response
  • Telegram bot (if integrated) also fails

Error pattern in ~/goclaw-data/goclaw.log:

security.hook.resolve_error err="resolve version check: SQL logic error: no such table: hooks (1)"
security.hook.resolve_error err="resolve version check: SQL logic error: no such table: hook_agents (1)"
security.hook.resolve_error err="resolve hooks: SQL logic error: no such column: name (1)"
inbound: agent run failed error="setup context: hook blocked user_prompt_submit"

Environment

  • GoClaw version: Lite v3.9.0
  • OS: Linux arm64 (Android / Termux proot — Honor 8x)
  • Database: SQLite (embedded)

Root Cause

The lite-v3.9.0 binary's hook dispatcher queries hooks and hook_agents tables (Standard-edition schema), but the Lite SQLite migration only creates agent_hooks. The version-check SQL fails with no such table: hooks → the hook resolver fails closed → every prompt is blocked, even when no hooks are configured.

The Lite edition migration is missing these two tables that the Standard dispatcher now depends on.

Workaround

Create compatibility views that map the Lite agent_hooks table to the Standard-expected hooks and hook_agents schema. No restart required — views are resolved per-query.

sqlite3 ~/goclaw-data/goclaw.db <<'SQL'
CREATE VIEW IF NOT EXISTS hook_agents AS
  SELECT id AS hook_id, agent_id FROM agent_hooks WHERE agent_id IS NOT NULL;

DROP VIEW IF EXISTS hooks;
CREATE VIEW hooks AS SELECT
  id, tenant_id, agent_id, scope, event, handler_type, config, matcher, if_expr,
  timeout_ms, on_timeout, priority, enabled, version, source, metadata, created_by,
  created_at, updated_at, id AS name, '' AS description
FROM agent_hooks;
SQL

After running this, retry the chat — it works immediately without restarting GoClaw.

Expected Behavior

GoClaw Lite should either:

  1. Ship the correct Lite migration that includes hooks and hook_agents tables/views, or
  2. Make the hook dispatcher resilient to missing tables (treat as "no hooks configured" instead of fail-closed), or
  3. Document that the Lite migration must be manually patched after upgrade to v3.9.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the Lite SQLite database and inspect the Lite migration alongside the hook dispatcher that queries hooks and hook_agents. Confirm the chosen fix by retrying dashboard, API, or Telegram chat and verifying that prompts reach the LLM without missing-table errors or manual compatibility views.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sqlite
Domain
backend, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.