chaitin / chaitin/MonkeyCode

重启agent 并清空上下文后发送信息报错

Open
#966 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.7k
Forks
719
Avg merge
4h 30m
Merged PRs (30d)
83

Description

在monkeycode页面点击"重启agent 并清空上下文"后,再进行对话的时候报错了,但是发起上下文压缩指令又是可以的。
报错信息:
[EXECUTION_FAILED] task execution failed: SQLiteError: NOT NULL constraint failed: session_message.seq
at run (unknown)
at #run (bun:sqlite:185:20)
at appendMessage (/$bunfs/root/chunk-zc8nmzza.js:2:62447)
at session.next.agent.switched (/$bunfs/root/chunk-zc8nmzza.js:2:56568)
at JP (/$bunfs/root/chunk-zc8nmzza.js:2:56513)
at Gn (/$bunfs/root/chunk-zc8nmzza.js:2:62489)
at (/$bunfs/root/chunk-zc8nmzza.js:2:62677)
at (/$bunfs/root/chunk-6rysx0s2.js:39:7317)
at Dh (/$bunfs/root/chunk-tw156w4q.js:688:32676)
at D6 (/$bunfs/root/chunk-6rysx0s2.js:39:7306)
at (/$bunfs/root/chunk-6rysx0s2.js:39:5669)
at run (node:async_hooks:62:22)
at SyncEvent.run (/$bunfs/root/chunk-12hxspsa.js:909:28504)
at SyncEvent.run (definition) (/$bunfs/root/chunk-6rysx0s2.js:39:5213)
at SessionPrompt.createUserMessage (/$bunfs/root/chunk-12hxspsa.js:1679:367)
at SessionPrompt.createUserMessage (definition) (/$bunfs/root/chunk-12hxspsa.js:1678:1998)
at SessionPrompt.prompt (/$bunfs/root/chunk-zc8nmzza.js:2:232606)
at SessionPrompt.prompt (definition) (/$bunfs/root/chunk-12hxspsa.js:1679:251)
at SessionHttpApi.promptAsync (/$bunfs/root/chunk-zc8nmzza.js:2:91986)
at SessionHttpApi.promptAsync (definition) (/$bunfs/root/chunk-zc8nmzza.js:2:232513)
at Server.listen (/$bunfs/root/chunk-zc8nmzza.js:2:249051)
at Server.listen (definition) (/$bunfs/root/chunk-zc8nmzza.js:2:249174)

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the failure by restarting the agent and clearing its context in the MonkeyCode page, then send a message and compare it with the context-compression flow. Start by tracing appendMessage and the session_message schema around the reported session.next.agent.switched path; done means messages can be sent successfully after the restart without the SQLite NOT NULL error.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, sqlite, typescript
Domain
backend, databases
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.