pingdotgg / pingdotgg/t3code

[Bug]: preview_evaluate fails with returnByValue: false

Open
#3,716 0 comments 0 reactions 0 assignees View on GitHub

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
  1. Start T3 Code Desktop.

  2. Open a Codex-backed thread with the T3 preview MCP tools available.

  3. Open any page in the browser preview.

  4. Call preview_evaluate with returnByValue: false for a simple object expression:

    {
      "expression": "({ alpha: 1, href: location.href })",
      "returnByValue": false
    }
    
  5. Call the same expression again with default by-value behavior:

    {
      "expression": "({ alpha: 1, ok: true })"
    }
    
Expected behavior

Either:

  • returnByValue: false should return a documented remote-object representation, or
  • the tool schema should reject or omit returnByValue: false if 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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.