From d2b91ae1a80dd4443f59418c0431deb707ee3eeb Mon Sep 17 00:00:00 2001 From: Hugo Dutka Date: Wed, 4 Jun 2025 14:32:27 +0200 Subject: [PATCH] adjust agentapi terminal width and height --- registry/coder/modules/claude-code/main.tf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/registry/coder/modules/claude-code/main.tf b/registry/coder/modules/claude-code/main.tf index ae4ec412..83d31b41 100644 --- a/registry/coder/modules/claude-code/main.tf +++ b/registry/coder/modules/claude-code/main.tf @@ -171,7 +171,9 @@ resource "coder_script" "claude_code" { export LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 - tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server -- bash -c "claude --dangerously-skip-permissions \"$CODER_MCP_CLAUDE_TASK_PROMPT\" | tee -a \"$HOME/.claude-code.log\""; exec bash' + # use low width to fit in the tasks UI sidebar. height is adjusted to ~match the default 80k (80x1000) characters + # visible in the terminal screen. + tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server --term-width 56 --term-height 1425 -- bash -c "claude --dangerously-skip-permissions \"$CODER_MCP_CLAUDE_TASK_PROMPT\" | tee -a \"$HOME/.claude-code.log\""; exec bash' echo "Waiting for agentapi server to start on port 3284..." for i in $(seq 1 15); do if lsof -i :3284 | grep -q 'LISTEN'; then @@ -260,7 +262,9 @@ resource "coder_app" "claude_code" { if ! tmux has-session -t claude-code-agentapi 2>/dev/null; then echo "Starting a new Claude Code agentapi tmux session." | tee -a "$HOME/.claude-code.log" - tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server -- bash -c "claude --dangerously-skip-permissions | tee -a \"$HOME/.claude-code.log\""; exec bash' + # use low width to fit in the tasks UI sidebar. height is adjusted to ~match the default 80k (80x1000) characters + # visible in the terminal screen. + tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server --term-width 56 --term-height 1425 -- bash -c "claude --dangerously-skip-permissions | tee -a \"$HOME/.claude-code.log\""; exec bash' fi if tmux has-session -t claude-code 2>/dev/null; then