Firebase Studio: Gemini History Reset Unexpectedly – How to Recover?

Temporary solution for the issue where agents restart Blueprint creation in existing workspaces (unofficial)

Verification has been completed, and I am pleased to report the following.
The following steps appear to allow you to continue editing without executing Blueprint creation in existing environments.
However, please note that if any conversation history has been saved in JSON files, it will be cleared.
To ensure you can revert to the previous state after executing the steps, please do not skip step 5.

Caution

This procedure is not an official guide, so please proceed at your own risk.

Steps

  1. Sign in to Firebase Studio.

  2. Click on the workspace where the Blueprint has been recreated from [My workspaces] and open it.

  3. Make sure that the last history is App Blueprint before proceeding to the next step.

  4. Click [Switch to Code] to open the code view.

    Switch to Code

  5. Press [Ctrl+`] to open the terminal (skip if the terminal is already open).

  6. Enter the following command in the terminal and press the [Enter] key to execute it, creating backups of the current capra-context-state.json and capra-thread.json files in the context_backup folder:

    timestamp=$(date +%Y%m%d%H%M%S); mkdir -p "/home/user/studio/context_backup/" && cp "/home/user/.idx/ai/capra-context-state.json" "/home/user/studio/context_backup/capra-context-state-${timestamp}.json" && cp "/home/user/.idx/ai/capra-thread.json" "/home/user/studio/context_backup/capra-thread-${timestamp}.json"
    

  7. Confirm that the backup has been created in the context_backup folder.

  8. Open .gitignore and add the following to the bottom:

    # prototyper
    /context_backup
    

    Note: This prevents the context_backup folder and the backup files within it from being used as input for the App prototyper agent context.

  9. Enter the following command in the terminal, press the [Enter] key to execute, replacing specific string in capra-context-state.json to switch from proposal creation mode to app editing mode:

    sed -i 's/create-proposal/edit-app/g' /home/user/.idx/ai/capra-context-state.json
    

    Note: Nothing will be displayed if the execution is completed successfully.

  10. Return to the Firebase Studio homepage (https://studio.firebase.google.com/).

  11. Reset the relevant workspace (this will only assign a new VM and will not delete any of your code files).

  12. Re-enter the workspace.

  13. Enter the edit request prompt in the input box and submit it.

  14. Verify that the App Blueprint is no longer created and that the app is edited.

Let’s wait for the dev team to implement a permanent/official solution.

@kirupa, please follow up on that for any corrections or additions to the above content, from you or other official team members.


If this information helps solve your issue, I would be very happy to hear from you :slightly_smiling_face:

1 Like