Why
keys already supports %variableName% substitution in both live execution and cache replay, but goto currently uses raw URL text in both paths.
That causes variable-driven navigation instructions to drift between intent and execution, especially when cached runs replay navigation steps.
Gap
- Live path:
goto tool does not substitute %variable% tokens before page.goto(...).
- Replay path:
AgentCache does not substitute %variable% tokens when replaying cached goto steps.
Proposed fix
- Add variable substitution in
goto tool execution before navigation.
- Keep recorded replay step URL tokenized (do not expand variables into cache records).
- Apply variable substitution during
AgentCache replay for goto steps.
- Add focused unit tests for both live tool behavior and replay behavior.
Acceptance criteria
%variable% tokens in goto URLs are resolved before navigation.
- Cached
goto steps replay with variable substitution.
- Existing
goto behavior for non-variable URLs remains unchanged.
Why
keysalready supports%variableName%substitution in both live execution and cache replay, butgotocurrently uses raw URL text in both paths.That causes variable-driven navigation instructions to drift between intent and execution, especially when cached runs replay navigation steps.
Gap
gototool does not substitute%variable%tokens beforepage.goto(...).AgentCachedoes not substitute%variable%tokens when replaying cachedgotosteps.Proposed fix
gototool execution before navigation.AgentCachereplay forgotosteps.Acceptance criteria
%variable%tokens ingotoURLs are resolved before navigation.gotosteps replay with variable substitution.gotobehavior for non-variable URLs remains unchanged.