Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: preview_evaluate accepts returnByValue:false but returns no usable object reference

Open Beginner friendly
#22,946 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
electron, typescript

Research direction

Read the returnByValue contract in packages/contracts/src/previewAutomation.ts and the result mapping in apps/server/src/preview/ServerBrowserPage.ts. Compare the Runtime.evaluate behavior for false and true, then check the existing preview automation tests for coverage. Done when false either returns a usable remote object reference or is explicitly rejected, while default and true still return object contents.

Written by the indexing model from the issue text.

Description

bug needs-triage

Written by human: this is possibly the lowest-priority issue I've ever opened. I seriously doubt anybody has ever actually encountered this problem naturally, but because it was mentioned once, my clankers keep bugging me to get this one fixed. IMO, the right solution is just to reject returnByValue:false altogether and close this out.


Written by AI:

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

packages/contracts or packages/shared

Steps to reproduce
  1. Open a fresh blank preview tab in T3 Code Desktop:

    preview_open({
      profileId: "incognito",
      reuseExistingTab: false,
      open: true,
      show: true
    })
    
  2. Retain its tab ID and evaluate an object with non-by-value mode:

    preview_evaluate({
      tabId,
      expression: "({ alpha: 1, href: location.href })",
      returnByValue: false
    })
    
  3. Repeat with returnByValue:true.

  4. Repeat with returnByValue omitted.

Expected behavior

Either return a usable remote-object reference, as the contract describes, or explicitly reject the unsupported false option.

Default and explicit by-value evaluation should continue returning object contents.

Actual behavior

returnByValue:false succeeds but returns only:

{"value":"Object"}

There is no object handle or content in the result.

The same expression with returnByValue:true returns:

{"value":{"alpha":1,"href":"about:blank"}}

Default by-value evaluation also works. The behavior reproduced repeatedly, on both a blank page and a locally served static page.

The original generic execution error from #3716 did not reproduce. This report concerns the remaining contract mismatch.

Impact

Minor bug or occasional failure

Version or commit

main @ 680152e27b2a961686389ca69a1557cbb2c55f08

Environment

Linux x86_64; Electron 44.9.3; Chromium 152.0.7977.167; Codex provider through T3 Code.

Logs or stack traces
No exception is returned.

The contract describes `returnByValue` as:

> Serialize and return the value instead of a remote object reference. Defaults to true.

https://github.com/pingdotgg/t3code/blob/680152e27b2a961686389ca69a1557cbb2c55f08/packages/contracts/src/previewAutomation.ts#L622

The server forwards the option to `Runtime.evaluate`, then maps the result to its value or description. The remote object ID is not returned:

https://github.com/pingdotgg/t3code/blob/680152e27b2a961686389ca69a1557cbb2c55f08/apps/server/src/preview/ServerBrowserPage.ts#L851
Screenshots, recordings, or supporting files

No response

Workaround

Omit returnByValue or set it to true when inspecting serializable values.

Related issues

Focused follow-up requested in the closing comment on #3716:
https://github.com/pingdotgg/t3code/issues/3716#issuecomment-6314979496

Explicitly rejecting false would resolve this report without requiring a new remote-object manipulation feature.

Investigated and drafted by GPT-6.1-Sol through the Codex harness in T3 Code.

Dominant language
TypeScript
Stars
24.8k
Forks
6.4k
Avg merge
3h 39m
Merged PRs (30d)
301

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.