Skip to content

Reduce prompt token overhead in context injections#370

Closed
tobiasbischoff wants to merge 1 commit intoopenclaw:mainfrom
tobiasbischoff:main
Closed

Reduce prompt token overhead in context injections#370
tobiasbischoff wants to merge 1 commit intoopenclaw:mainfrom
tobiasbischoff:main

Conversation

@tobiasbischoff
Copy link
Copy Markdown
Contributor

Summary

  • Stop listing unavailable tools in the system prompt.
  • Only inject non-empty workspace files and truncate large ones with a clear hint.
  • Make provider summary and group intro guidance more compact.

Details

  • Workspace bootstrap content is skipped when missing/empty and bounded to a short head/tail if oversized.
  • Provider summary strings are plain text (no ANSI color codes) and avoid extra allowlist output.
  • Group intro copy is shorter while preserving the same behavioral intent.

Token impact

Reduces prompt payload size on each run without changing runtime behavior.

Testing

  • Not run (not requested)

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 7, 2026

Oh this is very relevant - danke Tobias!

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 7, 2026

Landed on main with:\n- 412990a Reduce prompt token overhead with leaner context injections\n- e8420bd fix: refine bootstrap injections (restore missing markers, add truncation tests, keep emoji reactions, keep CLI allowFrom/colors while keeping prompts lean, update docs)

@steipete
Copy link
Copy Markdown
Contributor

steipete commented Jan 7, 2026

Merged on main as 412990a + e8420bd.

@steipete steipete closed this Jan 7, 2026
dgarson added a commit to dgarson/clawdbot that referenced this pull request Feb 9, 2026
* Web: wire OAuth connections flow

* Gateway: drop unused oauth import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants