Settings

Web Settings Guide

Hawa Code’s web interface includes a visual Settings (configuration) panel that lets you view and modify common settings directly in the browser without manually editing the settings.json file.


1. Open the Settings Panel

In the web page’s top toolbar, click the Settings button to switch to the settings view. Click Settings again or click the Close button to close the panel and return to Agent Viewer.


2. Interface Layout

The settings panel is divided into three areas:

  • Top title bar: Displays the current operation status, including the Reset, Save, and Close buttons.
  • Left navigation bar: A list of setting categories; click to switch between different categories.
  • Right content area: Displays all configuration items under the current category.

3. Setting Categories

The settings panel divides configuration items into 5 categories:

3.1 General

Manages the most commonly used global options.

Setting Description
proxy Enable/disable proxy
lazyTool Enable/disable tool lazy loading; when enabled, reduces the number of tools loaded at startup
thinking Model thinking intensity; options are off / low / medium / high, default medium
language Output language, default auto (automatic)
disableSuggestion Whether to disable the suggestion feature

3.2 Web Server

Configures the web service itself.

Setting Description
Enabled Whether to enable the Web Server
Port Web Server listening port, default 3210
Host Web Server listening address, default 127.0.0.1

Tip: After modifying the Web Server port or address, you usually need to restart the Web Server for the changes to take full effect.

3.3 Auto Mode

Configures the behavior of Auto Mode (YOLO mode).

Setting Description
Enabled Whether to enable Auto Mode
Model The model used by the classifier in Auto Mode
Max Consecutive Denials How many consecutive denials before falling back to manual prompts, default 3
Max Total Denials How many total denials before falling back to manual prompts, default 20

3.4 Memory

Configures automatic memory-related features.

Auto Memory (real-time memory extraction)

Setting Description
Enabled Whether to enable real-time memory extraction
Min Tokens Minimum token count to trigger memory extraction
Min Turns Minimum conversation turns to trigger memory extraction
Team Memory Enabled Whether to enable team memory

Auto Dream (automatic memory consolidation)

Setting Description
Enabled Whether to enable Auto Dream
Min Hours Minimum hours since the last automatic consolidation
Min Sessions Minimum number of new sessions required to trigger consolidation

3.5 Advanced

Configures advanced options such as environment variables, permissions, sandbox, and session summaries.

Setting Description
env Environment variables, configured as key-value pairs; take effect immediately after saving
permissions Permission configuration in JSON format, including allowed/denied/asked tool lists
sandbox Sandbox configuration in JSON format, controlling file system, network, and command permissions
sessionSummary Session summary configuration in JSON format, controlling automatic compression and summary thresholds

Note: permissions, sandbox, and sessionSummary are advanced configurations. It is recommended to modify them only after you are familiar with the meaning of each field.


4. Editing Configuration

Different types of configuration items provide different editing methods:

  • Toggle switch: Click to toggle between On / Off
  • Dropdown selection: Click the option box and select from the list
  • Text input box: Enter text directly
  • Number input box: Enter a number directly; some fields have minimum value limits
  • Object form: Combines multiple sub-fields into one configuration object
  • Key-value editor: Used for env environment variables; add, modify, or delete key-value pairs
  • JSON editor: Used for permissions, sandbox, and sessionSummary; edit JSON content directly, and format validation runs automatically on blur

5. Saving Configuration

  1. After modifying any configuration item, the changes are temporarily stored in the panel.
  2. When there are unsaved changes, the Save button becomes available.
  3. Click Save, and the system will write the changes to the current project’s configuration file.
  4. After a successful save, a “Settings saved successfully” message is displayed at the top.

Note: The configuration saved by the web Settings panel is written to the project-level configuration (.hcode/settings.json) and only takes effect for the current project.


6. Resetting Unsaved Changes

If you have modified configuration but do not want to save, click the Reset button, and all unsaved changes will be restored to the last saved state.


7. What to Do If Saving Fails

If an error message appears at the top when saving, possible causes include:

  • Network connection issues, preventing connection to the backend service
  • Incorrect input format, such as invalid JSON in the JSON editor
  • Input values do not meet validation rules, such as a port outside the valid range

It is recommended to check the input format or view the backend logs for the specific reason.


8. Configuration Scope

Hawa Code’s configuration is divided into two levels:

Level Storage Location Scope
User-level ~/.hcode/settings.json Applies to all projects
Project-level project-directory/.hcode/settings.json Applies only to the current project

The web Settings panel reads the merged configuration, but when saving, it only writes to the project-level configuration. Project-level configuration has higher priority than user-level configuration.


9. Hot Reloading Configuration

After saving the configuration, most settings take effect immediately without restarting Hawa Code. For example:

  • Environment variables in env are injected into the current process immediately after saving.
  • Configurations such as permissions and sandbox immediately affect subsequent operations after saving.

However, some configurations (such as the Web Server port and address) require restarting the Web Server to take full effect.


10. Usage Recommendations

  • For the first use, it is recommended to only modify common options in General.
  • After modifying Web Server configuration, remember to check whether the port is already in use.
  • When configuring env environment variables, both keys and values must be strings.
  • When editing JSON configurations, maintain correct JSON syntax.
  • For advanced configurations whose meanings are unclear, it is recommended to consult the relevant documentation first or keep the default values.

11. Frequently Asked Questions

Q: Why didn’t my configuration changes take effect immediately?
A: Most configurations take effect immediately, but Web Server-related configurations usually require restarting the service to take effect.

Q: Will the configuration modified in the web interface affect other projects?
A: No. The web Settings panel only writes to the current project’s configuration file and will not affect user-level configuration or other projects.

Q: When does the Reset button appear?
A: The Reset button appears when you have modified any configuration item but have not yet saved. After saving, if there are no unsaved changes, the button will automatically hide.

Q: Can I modify user-level configuration in the web interface?
A: Currently, the web Settings panel only supports writing to project-level configuration. To modify user-level configuration, please manually edit the ~/.hcode/settings.json file.