#telegram

1 messages Β· Page 1 of 1 (latest)

drowsy marsh
#

400 Item 'rs_0c904dd5bdb36e520069726a7ae4fc81968a67235d633b9992' of type 'reasoning' was provided without its required following item.

vast badgeBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> βœ… Mark Solution

loud mantleBOT
# drowsy marsh 400 Item 'rs_0c904dd5bdb36e520069726a7ae4fc81968a67235d633b9992' of type 'reason...

That looks like an Anthropic API error. It happens when the conversation history sent to the model includes a reasoning block (from extended thinking) that isn't immediately followed by a text block.

This usually occurs if a previous message got cut off (reasoning saved, but output crashed/stopped before text), and that "orphan" reasoning block is now stuck in your history. Clearing the session/conversation history should fix it! 🦐

drowsy marsh
#

it's from openai

loud mantleBOT
# drowsy marsh it's from openai

Ah, OpenAI! Same root cause though β€” corrupted conversation history.

OpenAI's structured outputs use rs_ prefixes for reasoning blocks, and they must be followed by a text block. Something in that session's history has an orphaned reasoning block.

Fix: Clear/reset the conversation history for that session. The corrupted message needs to be removed from the history stack.

drowsy marsh
#

how to do it?

loud mantleBOT
# drowsy marsh how to do it?

The easiest way is to restart the Clawdbot gateway β€” that wipes all in-memory session state and clears the corrupted history:

clawdbot gateway restart

Or if you want to target just that specific session, you can use the gateway API:

clawdbot gateway call session.clear

If you're running it as a service:

sudo systemctl restart clawdbot   # or whatever service name you use
#

The restart is the quickest fix and clears out any orphaned rs_ blocks safely! 🦐

drowsy marsh
#

Gateway call failed: Error: unknown method: session.clear

loud mantleBOT
# drowsy marsh Gateway call failed: Error: unknown method: session.clear

Ah, session.clear doesn't exist as a gateway method. Your options:

Option 1: Restart the gateway (clears everything)

clawdbot gateway restart

Option 2: If it's a cloud session, wait for the session to timeout (OpenAI sessions auto-expire) or start a fresh conversation thread.

Option 3: For local installs, you can find and delete the session file if it persists to disk:

# Check where sessions are stored
ls ~/.clawdbot/sessions/
# Delete the corrupted session
rm ~/.clawdbot/sessions/<session-id>.json
#

The gateway restart is usually the fastest clean solution! 🦐

drowsy marsh
#

restarted same problem

loud mantleBOT
# drowsy marsh restarted same problem

The data must be persisting somewhere. Let's find where it's stored:

# Search for recent session/history files
ls -la ~/.clawdbot/data/
ls -la ~/.clawdbot/sessions/ 2>/dev/null

# Check for any files modified today
find ~/.clawdbot -type f -mtime -1 | head -20

If you're using persistent storage (like the default JSON storage), look for:

  • ~/.clawdbot/data/messages.json
  • ~/.clawdbot/data/sessions/
  • Any *.json files with recent timestamps

Quick fix: Delete the relevant JSON file(s) in ~/.clawdbot/data/ then restart again.

#

If you can't find it, share the output of those commands and I'll help locate the exact file! 🦐

drowsy marsh
#

how to delete them ?

loud mantleBOT
# drowsy marsh how to delete them ?

Find the files first:

find ~/.clawdbot -type f -name "*.json" -mtime -1

Then delete the relevant ones (replace <path> with the actual file path):

rm -f ~/.clawdbot/data/<file>.json

Or if there's a sessions folder:

rm -f ~/.clawdbot/data/sessions/<session-id>.json
#

After deleting, restart the gateway:

clawdbot gateway restart

Want me to check for you? Run the find command and paste the output here! 🦐

drowsy marsh
#

/root/.clawdbot/devices/paired.json
/root/.clawdbot/devices/pending.json
/root/.clawdbot/telegram/update-offset-default.json
/root/.clawdbot/identity/device.json
/root/.clawdbot/identity/device-auth.json
/root/.clawdbot/agents/main/sessions/sessions.json
/root/.clawdbot/clawdbot.json
/root/.clawdbot/update-check.json
/root/.clawdbot/cron/jobs.json
/root/.clawdbot/credentials/telegram-allowFrom.json
/root/.clawdbot/credentials/telegram-pairing.json

loud mantleBOT
drowsy marsh
#

it cleared and after one message got corrupted again

loud mantleBOT
# drowsy marsh it cleared and after one message got corrupted again

That means something is regenerating the corrupted data. A few possibilities:

1. Check what's being sent to OpenAI β€” run with verbose logging:

clawdbot --verbose gateway

2. Check gateway logs for the actual request/response:

clawdbot gateway logs

3. What message did you send? The error might be triggered by specific prompts that trigger OpenAI's reasoning output.

4. Try a different model temporarily to isolate if it's OpenAI-side:

#
clawdbot model gpt-4o  # instead of o1/o3

The fact it happens on the first message suggests OpenAI might be sending back an incomplete structured output response, or there's a bug with that specific model variant.

Check the logs and let me know what model you're using and what the gateway says! 🦐

drowsy marsh
#

error: unknown option '--verbose'

loud mantleBOT
# drowsy marsh error: unknown option '--verbose'

Try these instead:

# Check gateway logs
clawdbot gateway logs

# Or if running as a service
journalctl -u clawdbot -n 100 --no-pager

# Check config for logging level
clawdbot config get | grep -i log

Also, what model are you using? That rs_ prefix suggests OpenAI's o1 or o3 models with reasoning. Try switching to gpt-4o temporarily:

#
clawdbot model gpt-4o

Let me know what you find in the logs! 🦐

drowsy marsh
#

error: unknown command 'model'
(Did you mean models?)

loud mantleBOT
# drowsy marsh error: unknown command 'model' (Did you mean models?)

Let me check the right commands. What model do you have set in your config?

cat /root/.clawdbot/clawdbot.json | grep -A5 "model"

And check the gateway logs:

tail -50 /root/.clawdbot/logs/*.log 2>/dev/null

If you can share what model you're using (from that config output), that would help! The rs_ error is specific to OpenAI's reasoning models (o1, o3, etc.). If you're using one of those, switching to gpt-4o in the config should fix it. 🦐

drowsy marsh
#

gpt 5.2

loud mantleBOT
# drowsy marsh gpt 5.2

That's the issue! GPT-5.2 has built-in reasoning (like o1/o3) and is sending structured outputs with rs_ blocks.

Quick fix: Switch to gpt-4o temporarily:

Edit your config:

nano /root/.clawdbot/clawdbot.json

Find the model setting and change it from gpt-5.2 to:

"gpt-4o"

Then restart:

#
clawdbot gateway restart

If that works, the issue is specifically with the GPT-5.2 reasoning integration. You might want to report this as a bug, but using gpt-4o should be stable for now! 🦐

drowsy marsh
#

1927ce2d2 sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 provider=openai model=gpt-5.2 thinking=low messageChannel=telegram
19:28:45 info diagnostic {"subsystem":"diagnostic"} session state: sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 sessionKey=unknown prev=idle new=processing reason="run_started" queueDepth=0
19:28:45 info diagnostic {"subsystem":"diagnostic"} run registered: sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 totalActive=1
19:28:45 debug agent/embedded {"subsystem":"agent/embedded"} embedded run prompt start: runId=e0fe370e-5d34-4b2c-a9e6-7b31927ce2d2 sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03
19:28:45 debug agent/embedded {"subsystem":"agent/embedded"} embedded run agent start: runId=e0fe370e-5d34-4b2c-a9e6-7b31927ce2d2
19:28:45 debug agent/embedded {"subsystem":"agent/embedded"} embedded run agent end: runId=e0fe370e-5d34-4b2c-a9e6-7b31927ce2d2
19:28:45 debug agent/embedded {"subsystem":"agent/embedded"} embedded run prompt end: runId=e0fe370e-5d34-4b2c-a9e6-7b31927ce2d2 sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 durationMs=383
19:28:45 info diagnostic {"subsystem":"diagnostic"} session state: sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 sessionKey=unknown prev=processing new=idle reason="run_completed" queueDepth=0
19:28:45 info diagnostic {"subsystem":"diagnostic"} run cleared: sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 totalActive=0
19:28:45 debug agent/embedded {"subsystem":"agent/embedded"} embedded run done: runId=e0fe370e-5d34-4b2c-a9e6-7b31927ce2d2 sessionId=23e2ce92-1fd3-44ab-a303-e00f5f4d1e03 durationMs=418 aborted=false
19:28:45 debug diagnostic {"subsystem":"diagnostic"} lane task done: lane=main durationMs=419 active=0 queued=0
19:28:45 debug diagnostic {"subsystem":"diagnostic"} lane task done: lane=session:agent:main:main durationMs=425 active=0 queued=0

loud mantleBOT
#
clawdbot gateway restart

If you want to keep using GPT-5.2, try thinking=off or check if there's a setting to disable structured outputs. But gpt-4o will be stable!

Let me know if the error persists after switching! 🦐

drowsy marsh
#

solved

loud mantleBOT
# drowsy marsh solved

Perfect! πŸŽ‰ The issue was indeed GPT-5.2's built-in reasoning/reasoning blocks causing the rs_ structured output errors. Using gpt-4o bypasses that.

If you want to use GPT-5.2 again later, just be aware it may have some quirks with the reasoning integration. gpt-4o is a solid daily driver!

Happy to help! 🦐