Skip to content

Enhancement: support file/text attachment as prompt input for long messages #218

Description

@TerrysPOV

Summary

Add support for file or text attachment uploads as an alternative way to send long prompts, analogous to how Claude.ai and ChatGPT.com allow pasting large blocks of text or uploading files.

Motivation

Raised in discussion on #190 by @christian-drescher and @mupic.

Messenger services impose character limits that can truncate or auto-split long messages into multiple chunks:

  • Discord DMs — strictly character-limited unless the user subscribes to Nitro.
  • Telegram — auto-splits long messages into sequential chunks, causing the agent to receive fragmented context and respond to each fragment separately.

The existing workaround (the message-coalescing accumulation window being discussed in #190) helps with multi-fragment messages, but doesn't address cases where the user genuinely wants to hand off a large body of text — a long spec, a code block, a pasted error log — as a single, coherent prompt.

Proposed behaviour

  • User sends a message that is just a file attachment (plain text, markdown, code) with an optional inline caption/instruction (e.g. "Review this spec and suggest improvements").
  • Claudeclaw reads the file contents and prepends them to the prompt before passing to Claude, so the agent sees the full text as a single message.
  • If no caption is provided, a sensible default like "Please review the attached content." is used.

Supported file types (initial scope)

  • .txt, .md, .py, .js, .ts, .json, .yaml, .toml, .html, .csv — plain-text formats Claude can reason over directly.
  • Potentially .pdf and .docx in a follow-up (would require a conversion step).

Notes

  • Relevant to both Telegram and Discord integrations.
  • Claude.ai and ChatGPT.com already normalise this UX pattern, so users will have a clear mental model for how it works.
  • Could also help as a complementary solution to the /fork workaround for long background tasks.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions