Skip to content

Commit 0f6aa69

Browse files
committed
fix(platform-web): point a refused text entry at a fresh snapshot, not setup
A live stale-ref fill showed text-entry-failed carrying the "run web setup" hint, but the backend ran and refused the entry. The hint now tells the caller to take a new snapshot and retry with its ref. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016qAu53rMak1bXMuR5U2gF4
1 parent df1edbb commit 0f6aa69

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/platform-web/src/agent-browser-provider.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ test('agent-browser provider keeps typed text out of argv and error details when
160160
assert.equal(error.code, 'COMMAND_FAILED');
161161
assert.match(error.message, /^agent-browser (fill|keyboard type) failed/);
162162
assert.equal(error.details?.reason, 'text-entry-failed');
163+
assert.match(String(error.details?.hint), /snapshot -i/);
163164
assert.equal(error.message.includes(secret), false);
164165
assert.equal(JSON.stringify(error.details).includes(secret), false);
165166
return true;

‎packages/platform-web/src/agent-browser-provider.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ async function sendTextEntry(send: AgentBrowserRunJson, command: readonly string
234234
args: ['batch'],
235235
command: commandName,
236236
reason: 'text-entry-failed',
237-
hint: AGENT_BROWSER_DOCTOR_HINT,
237+
// The backend ran and refused this entry, so its install is not the suspect.
238+
hint: 'The page refused this text entry: the target may have changed or gone. Run snapshot -i again and retry with the ref it reports.',
238239
});
239240
}
240241

0 commit comments

Comments
 (0)