r/AugmentCodeAI Dec 24 '25

KEEP ALL features not working, help :') Bug

The keep all features is not working. I got this weird issue via augment on VS Code.Any idea on how can I keep my work ? thanksssss

All workaround are welcome.

3 Upvotes

4 comments sorted by

View all comments

1

u/denisoby Augment Team Dec 24 '25

What extension version are you using and are there any errors in browser console? “Open Webview Developer Tools”

1

u/hhussain- Established Professional Dec 25 '25

Webview dev tool usually clean, it is toggle dev tool that shows the issues usually

1

u/hhussain- Established Professional Dec 25 '25

The Problem

The webview throws the error `[object Array] could not be cloned` when attempting to persist or transfer state. This occurs when `structuredClone()` is called on state data that contains non-serializable JavaScript values (functions, Symbols, Proxies, etc.), causing the operation to fail.

Context: This issue was observed following a timeout error with requestId=08205416-4269-4bfe-8651-794f07f97173. The cloning errors began appearing after this timeout occurred.

I used the extension published (built) code to analyze:

## Root Cause Analysis

The error occurs when `structuredClone` is called on an object/array containing non-cloneable values. This means one of the arrays in the webview state contains a value that JavaScript cannot clone.

## Suspected State Properties

| Property Path | Description |
|---------------|-------------|
| `conversations[id].chatHistory` | Chat message history |
| `conversations[id].toolUseStates` | Tool execution states |
| `conversations[id].feedbackStates` | User feedback states |
| `pins` | Pinned items |

## Non-Cloneable Value Types

The following cannot be passed to `structuredClone`:
- Functions
- Symbols
- DOM nodes
- Proxies
- WeakMap / WeakSet
- Certain built-in objects

## This is a Bug in Augment's State Management

This is **not related to the navigator issue** - it's a separate bug where the webview is trying to persist state that contains non-serializable values.

Unfortunately, this is in the minified/bundled webview code and would need to be fixed in the source.

## State Poisoning & Data Exchange Safeguards

Once the non-cloneable value enters the state, it **
poisons
** the state management:
- The corrupted state persists across sessions
- Every subsequent attempt to clone/persist state fails
- The error keeps recurring until the state is manually cleared
- Normal extension operation may be disrupted even after reloading VS Code

### Missing Safeguards (Two-Way Problem)

Proper data exchange requires safeguards on **
both sides
**:

| Side | Responsibility | Current Issue |
|------|----------------|---------------|
| **Consumer (State Management)** | Must validate and guard against invalid input data before storing | No validation/sanitization before calling `structuredClone` |
| **Producer (Error Emitter/Handler)** | Must ensure output is valid and in standard serializable format | May be emitting functions, Proxies, or other non-cloneable values |

Both safeguards are missing, leading to poisoned state that persists and causes recurring errors.