[Bug]: preview_evaluate fails with returnByValue: false
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
-
Start T3 Code Desktop.
-
Open a Codex-backed thread with the T3 preview MCP tools available.
-
Open any page in the browser preview.
-
Call
preview_evaluatewithreturnByValue: falsefor a simple object expression:{ "expression": "({ alpha: 1, href: location.href })", "returnByValue": false } -
Call the same expression again with default by-value behavior:
{ "expression": "({ alpha: 1, ok: true })" }
Expected behavior
Either:
returnByValue: falseshould return a documented remote-object representation, or- the tool schema should reject or omit
returnByValue: falseif non-by-value evaluation is not supported.
It should not accept the parameter and then fail with a generic execution error.
Actual behavior
preview_evaluate with returnByValue: false failed with a generic execution error:
PreviewAutomationExecutionError: Preview automation evaluate failed on client preview-...
Immediately afterward, normal by-value evaluation worked:
{
"alpha": 1,
"ok": true
}
Impact
Minor bug or occasional failure
Version or commit
T3 Code desktop 0.0.28-1 via t3code-bin AUR package.
Environment
Arch Linux x86_64, kernel 7.0.13-arch1-1, T3 Code desktop AppImage package via t3code-bin, Codex provider.
Logs or stack traces
PreviewAutomationExecutionError: Preview automation evaluate failed on client preview-...
Screenshots, recordings, or supporting files
No screenshot included. This is an API contract/implementation mismatch.
Workaround
Use default by-value evaluation for ordinary inspection.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/desktop by locating the preview_evaluate implementation and its returnByValue schema or handling. Reproduce the object expression with returnByValue set to false, then compare it with the default by-value call. Done when the parameter either produces a documented remote-object result or is rejected or omitted instead of causing a generic execution error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100